MCU driver/HAL for the Picocell Gateway concentrator board. The firmware implements either a USB CDC protocol or a UART protocol to bridge commands coming from host to the SX1308 SPI interface.
src/MAIN/board.h@0:c76361bd82e8, 2018-04-11 (annotated)
- Committer:
- dgabino
- Date:
- Wed Apr 11 14:42:47 2018 +0000
- Revision:
- 0:c76361bd82e8
Initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dgabino | 0:c76361bd82e8 | 1 | /* |
dgabino | 0:c76361bd82e8 | 2 | / _____) _ | | |
dgabino | 0:c76361bd82e8 | 3 | ( (____ _____ ____ _| |_ _____ ____| |__ |
dgabino | 0:c76361bd82e8 | 4 | \____ \| ___ | (_ _) ___ |/ ___) _ \ |
dgabino | 0:c76361bd82e8 | 5 | _____) ) ____| | | || |_| ____( (___| | | | |
dgabino | 0:c76361bd82e8 | 6 | (______/|_____)_|_|_| \__)_____)\____)_| |_| |
dgabino | 0:c76361bd82e8 | 7 | (C)2017 Semtech |
dgabino | 0:c76361bd82e8 | 8 | */ |
dgabino | 0:c76361bd82e8 | 9 | #ifndef BOARD_H |
dgabino | 0:c76361bd82e8 | 10 | #define BOARD_H |
dgabino | 0:c76361bd82e8 | 11 | |
dgabino | 0:c76361bd82e8 | 12 | #include "mbed.h" |
dgabino | 0:c76361bd82e8 | 13 | #include "SX1308.h" |
dgabino | 0:c76361bd82e8 | 14 | |
dgabino | 0:c76361bd82e8 | 15 | //#define USE_UART 1 |
dgabino | 0:c76361bd82e8 | 16 | |
dgabino | 0:c76361bd82e8 | 17 | #define BOOTLOADER_ADDR 0x1FFF0004 |
dgabino | 0:c76361bd82e8 | 18 | #define GOTO_BOOTLOADER 0x10 |
dgabino | 0:c76361bd82e8 | 19 | |
dgabino | 0:c76361bd82e8 | 20 | #define DATA_EEPROM_BASE ( ( uint32_t )0x8011000U ) /*!< DATA_EEPROM base address in the alias region */ |
dgabino | 0:c76361bd82e8 | 21 | #define DATA_EEPROM_END ( ( uint32_t )DATA_EEPROM_BASE + 2048 ) /*!< DATA EEPROM end address in the alias region */ |
dgabino | 0:c76361bd82e8 | 22 | |
dgabino | 0:c76361bd82e8 | 23 | extern SX1308 Sx1308; |
dgabino | 0:c76361bd82e8 | 24 | |
dgabino | 0:c76361bd82e8 | 25 | #ifndef USE_UART |
dgabino | 0:c76361bd82e8 | 26 | extern Serial pc; |
dgabino | 0:c76361bd82e8 | 27 | #endif |
dgabino | 0:c76361bd82e8 | 28 | |
dgabino | 0:c76361bd82e8 | 29 | extern DigitalOut HSCLKEN ; |
dgabino | 0:c76361bd82e8 | 30 | extern DigitalOut RADIO_RST ; |
dgabino | 0:c76361bd82e8 | 31 | #ifdef V2 |
dgabino | 0:c76361bd82e8 | 32 | extern DigitalOut FEM_EN; |
dgabino | 0:c76361bd82e8 | 33 | #endif |
dgabino | 0:c76361bd82e8 | 34 | |
dgabino | 0:c76361bd82e8 | 35 | extern void FLASH_Prog( uint32_t Address, uint8_t Data ); |
dgabino | 0:c76361bd82e8 | 36 | #endif |