mirror of https://github.com/ARMmbed/mbed-os.git
commit
f44b3ab3e2
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
#include "cmsis.h"
|
||||
|
||||
#include "gpio_irq_api.h"
|
||||
#include "error.h"
|
||||
#include "mbed_error.h"
|
||||
|
||||
#define CHANNEL_NUM 160
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include "gpio_irq_api.h"
|
||||
#include "gpio_api.h"
|
||||
#include "error.h"
|
||||
#include "mbed_error.h"
|
||||
|
||||
#define CHANNEL_NUM 64
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include "gpio_irq_api.h"
|
||||
#include "gpio_api.h"
|
||||
#include "error.h"
|
||||
#include "mbed_error.h"
|
||||
|
||||
#define CHANNEL_NUM 96
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include "cmsis.h"
|
||||
#include "pinmap.h"
|
||||
#include "error.h"
|
||||
#include "mbed_error.h"
|
||||
#include "PeripheralPins.h"
|
||||
|
||||
#define RANGE_12BIT 0xFFF
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
#include "cmsis.h"
|
||||
|
||||
#include "gpio_irq_api.h"
|
||||
#include "error.h"
|
||||
#include "mbed_error.h"
|
||||
|
||||
#define CHANNEL_NUM 31
|
||||
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
#include "analogin_api.h"
|
||||
#include "cmsis.h"
|
||||
#include "pinmap.h"
|
||||
#include "error.h"
|
||||
#include "mbed_error.h"
|
||||
|
||||
#if DEVICE_ANALOGIN
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
#include "cmsis.h"
|
||||
#include "gpio_irq_api.h"
|
||||
#include "error.h"
|
||||
#include "mbed_error.h"
|
||||
|
||||
#if DEVICE_INTERRUPTIN
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
#include "pwmout_api.h"
|
||||
#include "cmsis.h"
|
||||
#include "pinmap.h"
|
||||
#include "error.h"
|
||||
#include "mbed_error.h"
|
||||
|
||||
#if DEVICE_PWMOUT
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
#include "spi_api.h"
|
||||
#include "cmsis.h"
|
||||
#include "pinmap.h"
|
||||
#include "error.h"
|
||||
#include "mbed_error.h"
|
||||
|
||||
#if DEVICE_SPI
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
#include "can_api.h"
|
||||
|
||||
#include "cmsis.h"
|
||||
#include "error.h"
|
||||
#include "mbed_error.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
#include "can_api.h"
|
||||
|
||||
#include "cmsis.h"
|
||||
#include "error.h"
|
||||
#include "mbed_error.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#include "serial_api.h"
|
||||
#include "cmsis.h"
|
||||
#include "pinmap.h"
|
||||
#include "error.h"
|
||||
#include "mbed_error.h"
|
||||
|
||||
/******************************************************************************
|
||||
* INITIALIZATION
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#include "serial_api.h"
|
||||
#include "cmsis.h"
|
||||
#include "pinmap.h"
|
||||
#include "error.h"
|
||||
#include "mbed_error.h"
|
||||
|
||||
/******************************************************************************
|
||||
* INITIALIZATION
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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[] = {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
||||
/******************************************************************************
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 ,
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#include "serial_api.h"
|
||||
#include "cmsis.h"
|
||||
#include "pinmap.h"
|
||||
#include "error.h"
|
||||
#include "mbed_error.h"
|
||||
|
||||
/******************************************************************************
|
||||
* INITIALIZATION
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
|
|
|
|||
|
|
@ -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[] = {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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
Loading…
Reference in New Issue