Merge pull request #2 from mbedmicro/master

Update 2
pull/452/head
Przemek Wirkus 2014-08-20 10:35:32 +01:00
commit f44b3ab3e2
193 changed files with 385 additions and 308 deletions

View File

@ -232,7 +232,7 @@ void USBMSD::memoryWrite (uint8_t * buf, uint16_t size) {
// if the array is filled, write it in memory
if (!((addr + size)%BlockSize)) {
if (!(disk_status() & WRITE_PROTECT)) {
disk_write(page, addr/BlockSize);
disk_write(page, addr/BlockSize, 1);
}
}
@ -257,7 +257,7 @@ void USBMSD::memoryVerify (uint8_t * buf, uint16_t size) {
// beginning of a new block -> load a whole block in RAM
if (!(addr%BlockSize))
disk_read(page, addr/BlockSize);
disk_read(page, addr/BlockSize, 1);
// info are in RAM -> no need to re-read memory
for (n = 0; n < size; n++) {
@ -505,7 +505,7 @@ void USBMSD::memoryRead (void) {
// we read an entire block
if (!(addr%BlockSize))
disk_read(page, addr/BlockSize);
disk_read(page, addr/BlockSize, 1);
// write data which are in RAM
writeNB(EPBULK_IN, &page[addr%BlockSize], n, MAX_PACKET_SIZE_EPBULK);

View File

@ -88,22 +88,24 @@ public:
protected:
/*
* read a block on a storage chip
* read one or more blocks on a storage chip
*
* @param data pointer where will be stored read data
* @param block block number
* @param block starting block number
* @param count number of blocks to read
* @returns 0 if successful
*/
virtual int disk_read(uint8_t * data, uint64_t block) = 0;
virtual int disk_read(uint8_t* data, uint64_t block, uint8_t count) = 0;
/*
* write a block on a storage chip
* write one or more blocks on a storage chip
*
* @param data data to write
* @param block block number
* @param block starting block number
* @param count number of blocks to write
* @returns 0 if successful
*/
virtual int disk_write(const uint8_t * data, uint64_t block) = 0;
virtual int disk_write(const uint8_t* data, uint64_t block, uint8_t count) = 0;
/*
* Disk initilization

View File

@ -323,24 +323,34 @@ int USBHostMSD::disk_initialize() {
return readCapacity();
}
int USBHostMSD::disk_write(const uint8_t *buffer, uint64_t block_number) {
USB_DBG("FILESYSTEM: write block: %lld", block_number);
int USBHostMSD::disk_write(const uint8_t* buffer, uint64_t block_number, uint8_t count) {
USB_DBG("FILESYSTEM: write block: %lld, count: %d", block_number, count);
if (!disk_init) {
disk_initialize();
}
if (!disk_init)
return -1;
return dataTransfer((uint8_t *)buffer, block_number, 1, HOST_TO_DEVICE);
for (uint64_t b = block_number; b < block_number + count; b++) {
if (dataTransfer((uint8_t*)buffer, b, 1, HOST_TO_DEVICE))
return -1;
buffer += 512;
}
return 0;
}
int USBHostMSD::disk_read(uint8_t * buffer, uint64_t block_number) {
USB_DBG("FILESYSTEM: read block %lld", block_number);
int USBHostMSD::disk_read(uint8_t* buffer, uint64_t block_number, uint8_t count) {
USB_DBG("FILESYSTEM: read block: %lld, count: %d", block_number, count);
if (!disk_init) {
disk_initialize();
}
if (!disk_init)
return -1;
return dataTransfer((uint8_t *)buffer, block_number, 1, DEVICE_TO_HOST);
for (uint64_t b = block_number; b < block_number + count; b++) {
if (dataTransfer((uint8_t*)buffer, b, 1, DEVICE_TO_HOST))
return -1;
buffer += 512;
}
return 0;
}
uint64_t USBHostMSD::disk_sectors() {

View File

@ -59,8 +59,8 @@ protected:
// From FATFileSystem
virtual int disk_initialize();
virtual int disk_status() {return 0;};
virtual int disk_read(uint8_t * buffer, uint64_t sector);
virtual int disk_write(const uint8_t * buffer, uint64_t sector);
virtual int disk_read(uint8_t* buffer, uint64_t sector, uint8_t count);
virtual int disk_write(const uint8_t* buffer, uint64_t sector, uint8_t count);
virtual int disk_sync() {return 0;};
virtual uint64_t disk_sectors();

View File

@ -36,15 +36,10 @@ DRESULT disk_read (
)
{
debug_if(FFS_DBG, "disk_read(sector %d, count %d) on drv [%d]\n", sector, count, drv);
for(DWORD s=sector; s<sector+count; s++) {
debug_if(FFS_DBG, " disk_read(sector %d)\n", s);
int res = FATFileSystem::_ffs[drv]->disk_read((uint8_t*)buff, s);
if(res) {
return RES_PARERR;
}
buff += 512;
}
return RES_OK;
if (FATFileSystem::_ffs[drv]->disk_read((uint8_t*)buff, sector, count))
return RES_PARERR;
else
return RES_OK;
}
#if _READONLY == 0
@ -56,15 +51,10 @@ DRESULT disk_write (
)
{
debug_if(FFS_DBG, "disk_write(sector %d, count %d) on drv [%d]\n", sector, count, drv);
for(DWORD s = sector; s < sector + count; s++) {
debug_if(FFS_DBG, " disk_write(sector %d)\n", s);
int res = FATFileSystem::_ffs[drv]->disk_write((uint8_t*)buff, s);
if(res) {
return RES_PARERR;
}
buff += 512;
}
return RES_OK;
if (FATFileSystem::_ffs[drv]->disk_write((uint8_t*)buff, sector, count))
return RES_PARERR;
else
return RES_OK;
}
#endif /* _READONLY */

View File

@ -29,6 +29,9 @@
using namespace mbed;
/**
* FATFileSystem based on ChaN's Fat Filesystem library v0.8
*/
class FATFileSystem : public FileSystemLike {
public:
@ -39,19 +42,50 @@ public:
FATFS _fs; // Work area (file system object) for logical drive
int _fsid;
/**
* Opens a file on the filesystem
*/
virtual FileHandle *open(const char* name, int flags);
/**
* Removes a file path
*/
virtual int remove(const char *filename);
/**
* Renames a file
*/
virtual int rename(const char *oldname, const char *newname);
/**
* Formats a logical drive, FDISK artitioning rule, 512 bytes per cluster
*/
virtual int format();
/**
* Opens a directory on the filesystem
*/
virtual DirHandle *opendir(const char *name);
/**
* Creates a directory path
*/
virtual int mkdir(const char *name, mode_t mode);
/**
* Mounts the filesystem
*/
virtual int mount();
/**
* Unmounts the filesystem
*/
virtual int unmount();
virtual int disk_initialize() { return 0; }
virtual int disk_status() { return 0; }
virtual int disk_read(uint8_t * buffer, uint64_t sector) = 0;
virtual int disk_write(const uint8_t * buffer, uint64_t sector) = 0;
virtual int disk_read(uint8_t * buffer, uint64_t sector, uint8_t count) = 0;
virtual int disk_write(const uint8_t * buffer, uint64_t sector, uint8_t count) = 0;
virtual int disk_sync() { return 0; }
virtual uint64_t disk_sectors() = 0;

View File

@ -223,33 +223,41 @@ int SDFileSystem::disk_initialize() {
return 0;
}
int SDFileSystem::disk_write(const uint8_t *buffer, uint64_t block_number) {
int SDFileSystem::disk_write(const uint8_t* buffer, uint64_t block_number, uint8_t count) {
if (!_is_initialized) {
return -1;
}
// set write address for single block (CMD24)
if (_cmd(24, block_number * cdv) != 0) {
return 1;
for (uint64_t b = block_number; b < block_number + count; b++) {
// set write address for single block (CMD24)
if (_cmd(24, b * cdv) != 0) {
return 1;
}
// send the data block
_write(buffer, 512);
buffer += 512;
}
// send the data block
_write(buffer, 512);
return 0;
}
int SDFileSystem::disk_read(uint8_t *buffer, uint64_t block_number) {
int SDFileSystem::disk_read(uint8_t* buffer, uint64_t block_number, uint8_t count) {
if (!_is_initialized) {
return -1;
}
// set read address for single block (CMD17)
if (_cmd(17, block_number * cdv) != 0) {
return 1;
for (uint64_t b = block_number; b < block_number + count; b++) {
// set read address for single block (CMD17)
if (_cmd(17, b * cdv) != 0) {
return 1;
}
// receive the data
_read(buffer, 512);
buffer += 512;
}
// receive the data
_read(buffer, 512);
return 0;
}

View File

@ -54,8 +54,8 @@ public:
SDFileSystem(PinName mosi, PinName miso, PinName sclk, PinName cs, const char* name);
virtual int disk_initialize();
virtual int disk_status();
virtual int disk_read(uint8_t * buffer, uint64_t block_number);
virtual int disk_write(const uint8_t * buffer, uint64_t block_number);
virtual int disk_read(uint8_t* buffer, uint64_t block_number, uint8_t count);
virtual int disk_write(const uint8_t* buffer, uint64_t block_number, uint8_t count);
virtual int disk_sync();
virtual uint64_t disk_sectors();

View File

@ -16,7 +16,7 @@
#ifndef MBED_H
#define MBED_H
#define MBED_LIBRARY_VERSION 86
#define MBED_LIBRARY_VERSION 88
#include "platform.h"
@ -25,7 +25,7 @@
#include <time.h>
// mbed Debug libraries
#include "error.h"
#include "mbed_error.h"
#include "mbed_interface.h"
// mbed Peripheral components

View File

@ -17,7 +17,7 @@
#include <stdarg.h>
#include "device.h"
#include "toolchain.h"
#include "error.h"
#include "mbed_error.h"
#if DEVICE_STDIO_MESSAGES
#include <stdio.h>
#endif

View File

@ -19,7 +19,7 @@
#include "gpio_api.h"
#include "wait_api.h"
#include "semihost_api.h"
#include "error.h"
#include "mbed_error.h"
#include "toolchain.h"
#if DEVICE_SEMIHOST

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
void pinmap_pinout(PinName pin, const PinMap *map) {
if (pin == NC)

View File

@ -392,7 +392,7 @@ extern "C" int mkdir(const char *path, mode_t mode) {
#if defined(TOOLCHAIN_GCC)
/* prevents the exception handling name demangling code getting pulled in */
#include "error.h"
#include "mbed_error.h"
namespace __gnu_cxx {
void __verbose_terminate_handler() {
error("Exception");

View File

@ -46,7 +46,7 @@ __initial_sp EQU 0x20002000 ; Top of RAM (8 KB for STM32F030R8)
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h>
Heap_Size EQU 0x00000000
Heap_Size EQU 0x00000400
AREA HEAP, NOINIT, READWRITE, ALIGN=3
EXPORT __heap_base

View File

@ -58,7 +58,7 @@ __initial_sp EQU 0x20004000 ; Top of RAM (16KB)
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h>
Heap_Size EQU 0x00000200
Heap_Size EQU 0x00000400
AREA HEAP, NOINIT, READWRITE, ALIGN=3
EXPORT __heap_base

View File

@ -46,7 +46,7 @@ __initial_sp EQU 0x20005000 ; Top of RAM
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h>
Heap_Size EQU 0x00000000
Heap_Size EQU 0x00000400
AREA HEAP, NOINIT, READWRITE, ALIGN=3
EXPORT __heap_base

View File

@ -48,7 +48,7 @@ __initial_sp EQU 0x20004000 ; Top of RAM
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h>
Heap_Size EQU 0x00000000
Heap_Size EQU 0x00000400
AREA HEAP, NOINIT, READWRITE, ALIGN=3
EXPORT __heap_base

View File

@ -58,7 +58,7 @@ __initial_sp EQU 0x20003000 ; Top of RAM
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h>
Heap_Size EQU 0x00000000
Heap_Size EQU 0x00000400
AREA HEAP, NOINIT, READWRITE, ALIGN=3
EXPORT __heap_base

View File

@ -58,7 +58,7 @@ __initial_sp EQU 0x20020000 ; Top of RAM
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h>
Heap_Size EQU 0x00000000
Heap_Size EQU 0x00000400
AREA HEAP, NOINIT, READWRITE, ALIGN=3
EXPORT __heap_base

View File

@ -58,7 +58,7 @@ __initial_sp EQU 0x20002000 ; Top of RAM
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h>
Heap_Size EQU 0x00000000
Heap_Size EQU 0x00000400
AREA HEAP, NOINIT, READWRITE, ALIGN=3
EXPORT __heap_base

View File

@ -46,7 +46,7 @@ __initial_sp EQU 0x20014000 ; Top of RAM (80 KB for STM32L152RE)
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h>
Heap_Size EQU 0x00000000
Heap_Size EQU 0x00000400
AREA HEAP, NOINIT, READWRITE, ALIGN=3
EXPORT __heap_base

View File

@ -17,7 +17,7 @@
#include "cmsis.h"
#include "gpio_irq_api.h"
#include "error.h"
#include "mbed_error.h"
#define CHANNEL_NUM 160

View File

@ -18,7 +18,7 @@
#include "gpio_irq_api.h"
#include "gpio_api.h"
#include "error.h"
#include "mbed_error.h"
#define CHANNEL_NUM 64 // 31 pins on 2 ports

View File

@ -18,7 +18,7 @@
#include "gpio_irq_api.h"
#include "gpio_api.h"
#include "error.h"
#include "mbed_error.h"
#define CHANNEL_NUM 64

View File

@ -18,7 +18,7 @@
#include "gpio_irq_api.h"
#include "gpio_api.h"
#include "error.h"
#include "mbed_error.h"
#define CHANNEL_NUM 96

View File

@ -19,7 +19,7 @@
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
#include "PeripheralPins.h"
#define RANGE_12BIT 0xFFF

View File

@ -23,7 +23,7 @@
#include "gpio_api.h"
#include "fsl_gpio_hal.h"
#include "fsl_port_hal.h"
#include "error.h"
#include "mbed_error.h"
#define CHANNEL_NUM 160

View File

@ -15,7 +15,7 @@
*/
#include "mbed_assert.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
#include "fsl_clock_manager.h"
#include "fsl_port_hal.h"

View File

@ -22,7 +22,7 @@
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
#include "fsl_clock_manager.h"
#include "fsl_dspi_hal.h"
#include "PeripheralPins.h"

View File

@ -114,7 +114,8 @@ typedef enum {
// mBed interface Pins
USBTX = TX_PIN_NUMBER,
USBRX = RX_PIN_NUMBER,
/*
SPI_PSELMOSI0 = p20,
SPI_PSELMISO0 = p22,
SPI_PSELSS0 = p24,
@ -124,43 +125,48 @@ typedef enum {
SPI_PSELMISO1 = p13,
SPI_PSELSS1 = p14,
SPI_PSELSCK1 = p15,
SPIS_PSELMOSI = p12,
SPIS_PSELMISO = p13,
*/
SPIS_PSELMOSI = p20,
SPIS_PSELMISO = p22,
SPIS_PSELSS = p14,
SPIS_PSELSCK = p15,
SPIS_PSELSCK = p25,
I2C_SDA0 = p22,
I2C_SCL0 = p20,
I2C_SDA0 = p29,
I2C_SCL0 = p28,
/*
I2C_SDA1 = p13,
I2C_SCL1 = p15,
D0 = p7,
D1 = p8,
D2 = p9,
D3 = p10,
D4 = p11,
D5 = p12,
D6 = p13,
*/
D0 = p11,
D1 = p9,
D2 = p10,
D3 = p8,
D4 = p21,
D5 = p23,
D6 = p16,
D7 = p17,
D8 = p18,
D9 = p23,
D10 = p24,
D11 = p25,
D12 = p28,
D13 = p29,
D8 = p19,
D9 = p18,
D10 = p14,
D11 = p12,
D12 = p13,
D13 = p15,
/*
D14 = p5,
D15 = p6,
*/
A0 = p1,
A1 = p2,
A2 = p3,
A3 = p4,
A4 = p5,
A5 = p6,
A0 = p6,
A1 = p5,
A2 = p4,
A3 = p3,
A4 = p2,
A5 = p1,
// Not connected
NC = (int)0xFFFFFFFF

View File

@ -17,7 +17,7 @@
#include "cmsis.h"
#include "gpio_irq_api.h"
#include "error.h"
#include "mbed_error.h"
#define CHANNEL_NUM 31

View File

@ -15,7 +15,7 @@
*/
#include "mbed_assert.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
void pin_function(PinName pin, int function) {
}

View File

@ -17,7 +17,7 @@
#include "pwmout_api.h"
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
#define NO_PWMS 3
#define TIMER_PRECISION 4 //4us ticks

View File

@ -27,16 +27,6 @@
******************************************************************************/
#define UART_NUM 1
static const PinMap PinMap_UART_TX[] = {
{TX_PIN_NUMBER, UART_0, 1},
{ NC , NC , 0}
};
static const PinMap PinMap_UART_RX[] = {
{RX_PIN_NUMBER, UART_0, 1},
{NC , NC , 0}
};
static uint32_t serial_irq_ids[UART_NUM] = {0};
static uart_irq_handler irq_handler;
static uint32_t acceptedSpeeds[16][2] = {{1200,UART_BAUDRATE_BAUDRATE_Baud1200},
@ -61,10 +51,7 @@ serial_t stdio_uart;
void serial_init(serial_t *obj, PinName tx, PinName rx) {
// determine the UART to use -- for mcu's with multiple uart connections
UARTName uart_tx = (UARTName)pinmap_peripheral(tx, PinMap_UART_TX);
UARTName uart_rx = (UARTName)pinmap_peripheral(rx, PinMap_UART_RX);
UARTName uart = (UARTName)pinmap_merge(uart_tx, uart_rx);
UARTName uart = UART_0;
MBED_ASSERT((int)uart != NC);

View File

@ -18,7 +18,7 @@
#include "spi_api.h"
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
static const PinMap PinMap_SPI_SCLK[] = {
{SPI_PSELSCK0 , SPI_0, 0x01},

View File

@ -17,7 +17,7 @@
#include "analogin_api.h"
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
#if DEVICE_ANALOGIN

View File

@ -17,7 +17,7 @@
#include "cmsis.h"
#include "gpio_irq_api.h"
#include "error.h"
#include "mbed_error.h"
#if DEVICE_INTERRUPTIN

View File

@ -15,7 +15,7 @@
*/
#include "mbed_assert.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
void pin_function(PinName pin, int function) {
MBED_ASSERT(pin != (PinName)NC);

View File

@ -17,7 +17,7 @@
#include "pwmout_api.h"
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
#if DEVICE_PWMOUT

View File

@ -19,7 +19,7 @@
#include "spi_api.h"
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
#if DEVICE_SPI

View File

@ -17,7 +17,7 @@
#include "analogin_api.h"
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
#include "PeripheralPins.h" // For the Peripheral to Pin Definitions found in the individual Target's Platform
#define ANALOGIN_MEDIAN_FILTER 1

View File

@ -16,7 +16,7 @@
#include <stddef.h>
#include "cmsis.h"
#include "gpio_irq_api.h"
#include "error.h"
#include "mbed_error.h"
#define CHANNEL_NUM 8
#define LPC_GPIO_X LPC_GPIO_PIN_INT

View File

@ -15,7 +15,7 @@
*/
#include "mbed_assert.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
#define LPC_IOCON0_BASE (LPC_IOCON_BASE)
#define LPC_IOCON1_BASE (LPC_IOCON_BASE + 0x60)

View File

@ -18,7 +18,7 @@
#include "spi_api.h"
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
#include "PeripheralPins.h" // For the Peripheral to Pin Definitions found in the individual Target's Platform
static inline int ssp_disable(spi_t *obj);

View File

@ -16,7 +16,7 @@
#include "can_api.h"
#include "cmsis.h"
#include "error.h"
#include "mbed_error.h"
#include <math.h>
#include <string.h>

View File

@ -17,7 +17,7 @@
#include "analogin_api.h"
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
static const PinMap PinMap_ADC[] = {
{P0_11, ADC0_0, 2},

View File

@ -16,7 +16,7 @@
#include <stddef.h>
#include "cmsis.h"
#include "gpio_irq_api.h"
#include "error.h"
#include "mbed_error.h"
#include "gpio_api.h"
// The chip is capable of 42 GPIO interrupts.

View File

@ -17,7 +17,7 @@
#include "i2c_api.h"
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
static const PinMap PinMap_I2C_SDA[] = {
{P0_5, I2C_0, 1},

View File

@ -15,7 +15,7 @@
*/
#include "mbed_assert.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
void pin_function(PinName pin, int function) {
MBED_ASSERT(pin != (PinName)NC);

View File

@ -18,7 +18,7 @@
#include "spi_api.h"
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
static const PinMap PinMap_SPI_SCLK[] = {
{P0_6 , SPI_0, 0x02},

View File

@ -17,7 +17,7 @@
#include "analogin_api.h"
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
#define ANALOGIN_MEDIAN_FILTER 1

View File

@ -16,7 +16,7 @@
#include <stddef.h>
#include "cmsis.h"
#include "gpio_irq_api.h"
#include "error.h"
#include "mbed_error.h"
#define CHANNEL_NUM 8
#define LPC_GPIO_X LPC_GPIO_PIN_INT

View File

@ -17,7 +17,7 @@
#include "i2c_api.h"
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
static const PinMap PinMap_I2C_SDA[] = {
{P0_5, I2C_0, 1},

View File

@ -15,7 +15,7 @@
*/
#include "mbed_assert.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
#define LPC_IOCON0_BASE (LPC_IOCON_BASE)
#define LPC_IOCON1_BASE (LPC_IOCON_BASE + 0x60)

View File

@ -18,7 +18,7 @@
#include "spi_api.h"
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
static const PinMap PinMap_SPI_SCLK[] = {
{P0_6 , SPI_0, 0x02},

View File

@ -17,7 +17,7 @@
#include "can_api.h"
#include "cmsis.h"
#include "error.h"
#include "mbed_error.h"
#include <math.h>
#include <string.h>

View File

@ -17,7 +17,7 @@
#include "cmsis.h"
#include "gpio_irq_api.h"
#include "error.h"
#include "mbed_error.h"
#define CHANNEL_NUM 8
#define LPC_GPIO_X LPC_PINT

View File

@ -15,7 +15,7 @@
*/
#include "mbed_assert.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
void pin_function(PinName pin, int function) {
}

View File

@ -17,7 +17,7 @@
#include "pwmout_api.h"
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
static LPC_SCT0_Type *SCTs[4] = {
(LPC_SCT0_Type*)LPC_SCT0,

View File

@ -21,7 +21,7 @@
#include "serial_api.h"
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
/******************************************************************************
* INITIALIZATION

View File

@ -19,7 +19,7 @@
#include "spi_api.h"
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
static const SWM_Map SWM_SPI_SSEL[] = {
{4, 0},

View File

@ -19,7 +19,7 @@
#include "cmsis.h"
#include "mbed_interface.h"
#include "toolchain.h"
#include "error.h"
#include "mbed_error.h"
#define NEW_LOGIC 0
#define NEW_ETH_BUFFER 0

View File

@ -16,7 +16,7 @@
#include <stddef.h>
#include "gpio_irq_api.h"
#include "error.h"
#include "mbed_error.h"
#include "cmsis.h"
#define CHANNEL_NUM 48

View File

@ -15,7 +15,7 @@
*/
#include "mbed_assert.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
void pin_function(PinName pin, int function) {
MBED_ASSERT(pin != (PinName)NC);

View File

@ -19,7 +19,7 @@
#include "spi_api.h"
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
static const PinMap PinMap_SPI_SCLK[] = {
{P0_7 , SPI_1, 2},

View File

@ -19,7 +19,7 @@
#include "cmsis.h"
#include "mbed_interface.h"
#include "toolchain.h"
#include "error.h"
#include "mbed_error.h"
#define NEW_LOGIC 0
#define NEW_ETH_BUFFER 0

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
#include "gpio_irq_api.h"
#include "error.h"
#include "mbed_error.h"
#include <stddef.h>
#include "cmsis.h"

View File

@ -15,7 +15,7 @@
*/
#include "mbed_assert.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
void pin_function(PinName pin, int function) {
MBED_ASSERT(pin != (PinName)NC);

View File

@ -19,7 +19,7 @@
#include "spi_api.h"
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
static const PinMap PinMap_SPI_SCLK[] = {
{P0_7 , SPI_1, 2},

View File

@ -17,7 +17,7 @@
#include "analogin_api.h"
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
#define ANALOGIN_MEDIAN_FILTER 1

View File

@ -19,7 +19,7 @@
#include "cmsis.h"
#include "mbed_interface.h"
#include "toolchain.h"
#include "error.h"
#include "mbed_error.h"
#define NEW_LOGIC 0
#define NEW_ETH_BUFFER 0

View File

@ -15,7 +15,7 @@
*/
#include <stddef.h>
#include "gpio_irq_api.h"
#include "error.h"
#include "mbed_error.h"
#include "cmsis.h"
#define CHANNEL_NUM 64

View File

@ -15,7 +15,7 @@
*/
#include "mbed_assert.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
void pin_function(PinName pin, int function) {
MBED_ASSERT(pin != (PinName)NC);

View File

@ -21,7 +21,7 @@
#include "serial_api.h"
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
/******************************************************************************
* INITIALIZATION

View File

@ -18,7 +18,7 @@
#include "spi_api.h"
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
static const PinMap PinMap_SPI_SCLK[] = {
{P0_7 , SPI_1, 2},

View File

@ -19,7 +19,7 @@
#include "analogin_api.h"
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
#include "gpio_api.h"
#define ANALOGIN_MEDIAN_FILTER 1

View File

@ -20,7 +20,7 @@
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
#include "gpio_api.h"
static const PinMap PinMap_DAC[] = {

View File

@ -21,7 +21,7 @@
#include "cmsis.h"
#include "mbed_interface.h"
#include "toolchain.h"
#include "error.h"
#include "mbed_error.h"
#define NEW_LOGIC 0
#define NEW_ETH_BUFFER 0

View File

@ -17,7 +17,7 @@
*/
#include <stddef.h>
#include "gpio_irq_api.h"
#include "error.h"
#include "mbed_error.h"
#include "cmsis.h"
/* The LPC43xx implements GPIO pin and group interrupts. Any pin in the

View File

@ -18,7 +18,7 @@
#include "i2c_api.h"
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
// SCU mode for I2C SCL/SDA pins
#define SCU_PINIO_I2C SCU_PINIO_PULLNONE

View File

@ -17,7 +17,7 @@
*/
#include "mbed_assert.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
void pin_function(PinName pin, int function) {
MBED_ASSERT(pin != (PinName)NC);

View File

@ -19,7 +19,7 @@
#include "pwmout_api.h"
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
// PWM implementation for the LPC43xx using State Configurable Timer (SCT)
// * PWM_0 to PWM_15 on mbed use CTOUT_0 to CTOUT_15 outputs on LPC43xx

View File

@ -23,7 +23,7 @@
#include "serial_api.h"
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
#include "gpio_api.h"
/******************************************************************************

View File

@ -21,7 +21,7 @@
#include "spi_api.h"
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
// SCU mode for SPI pins
#define SCU_PINIO_SPI SCU_PINIO_FAST

View File

@ -17,7 +17,7 @@
#include "cmsis.h"
#include "gpio_irq_api.h"
#include "error.h"
#include "mbed_error.h"
#define CHANNEL_NUM 8
#define LPC_GPIO_X LPC_PIN_INT

View File

@ -15,7 +15,7 @@
*/
#include "mbed_assert.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
__IO uint32_t* IOCON_REGISTERS[18] = {
&LPC_IOCON->PIO0_0 , &LPC_IOCON->PIO0_1 , &LPC_IOCON->PIO0_2 ,

View File

@ -21,7 +21,7 @@
#include "serial_api.h"
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
/******************************************************************************
* INITIALIZATION

View File

@ -19,7 +19,7 @@
#include "spi_api.h"
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
static const SWM_Map SWM_SPI_SSEL[] = {
{4, 16},

View File

@ -32,7 +32,7 @@
#include "cmsis.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
#include "wait_api.h"
static const PinMap PinMap_ADC[] = {

View File

@ -30,7 +30,7 @@
#include "mbed_assert.h"
#include "gpio_api.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
extern uint32_t Set_GPIO_Clock(uint32_t port_idx);

View File

@ -32,7 +32,7 @@
#include "gpio_irq_api.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
#define EDGE_NONE (0)
#define EDGE_RISE (1)

View File

@ -30,7 +30,7 @@
#include "mbed_assert.h"
#include "pinmap.h"
#include "PortNames.h"
#include "error.h"
#include "mbed_error.h"
// Enable GPIO clock and return GPIO base address
uint32_t Set_GPIO_Clock(uint32_t port_idx) {

View File

@ -33,7 +33,7 @@
#include "pinmap.h"
#include "gpio_api.h"
#include "error.h"
#include "mbed_error.h"
extern uint32_t Set_GPIO_Clock(uint32_t port_idx);

View File

@ -30,7 +30,7 @@
#include "mbed_assert.h"
#include "gpio_api.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
extern uint32_t Set_GPIO_Clock(uint32_t port_idx);

View File

@ -32,7 +32,7 @@
#include "gpio_irq_api.h"
#include "pinmap.h"
#include "error.h"
#include "mbed_error.h"
#define EDGE_NONE (0)
#define EDGE_RISE (1)

Some files were not shown because too many files have changed in this diff Show More