Raghu Tirumala / Mbed OS ATT_IoT_Project

Dependencies:   BufferedSoftSerial SDFileSystem

Fork of ATT_AWS_IoT_demo by AT&T IoT

Committer:
ampembeng
Date:
Thu Dec 01 18:05:38 2016 +0000
Revision:
15:6f2798e45099
Initial commit.  Demo works with both the FRDM wired Ethernet and the Avnet Shield wireless modem.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ampembeng 15:6f2798e45099 1 /*
ampembeng 15:6f2798e45099 2
ampembeng 15:6f2798e45099 3 To add another device some functions/macros need to be defined.
ampembeng 15:6f2798e45099 4 The Device folder shows examples of other devices.
ampembeng 15:6f2798e45099 5
ampembeng 15:6f2798e45099 6 1. In MACROS.h the include to the macro file need to be added.
ampembeng 15:6f2798e45099 7
ampembeng 15:6f2798e45099 8 2. A <NameOfYourFile.h> file needs to be added, it needs to include the ifdef(target) statement, and definitions for:
ampembeng 15:6f2798e45099 9 MODSERIAL_IRQ_REG --- register which enables/disables serial IRQs
ampembeng 15:6f2798e45099 10 DISABLE_TX_IRQ --- macro that disables TX IRQs
ampembeng 15:6f2798e45099 11 DISABLE_RX_IRQ --- macro that disables RX IRQs
ampembeng 15:6f2798e45099 12 ENABLE_TX_IRQ --- macro that enables TX IRQs
ampembeng 15:6f2798e45099 13 ENABLE_RX_IRQ --- macro that enables RX IRQs
ampembeng 15:6f2798e45099 14
ampembeng 15:6f2798e45099 15 RESET_TX_FIFO --- macro that resets TX FIFO buffer, if applicable. If not, something like while(1==0) won't do anything and doesn't generate compiler warnings
ampembeng 15:6f2798e45099 16 RESET_RX_FIFO --- macro that resets RX FIFO buffer, if no hardware options, you can also read data until no more data is available
ampembeng 15:6f2798e45099 17
ampembeng 15:6f2798e45099 18 MODSERIAL_READ_REG --- register where RX data is in
ampembeng 15:6f2798e45099 19 MODSERIAL_WRITE_REG --- register where TX data is in (can be same as previous)
ampembeng 15:6f2798e45099 20 MODSERIAL_READABLE --- returns true if new data is available in read_reg
ampembeng 15:6f2798e45099 21 MODSERIAL_WRITABLE --- returns true if we may write new data in write_reg
ampembeng 15:6f2798e45099 22
ampembeng 15:6f2798e45099 23 RX_IRQ_ENABLED --- checks if RX IRQs are enabled by MODSERIAL. Only required if the device has no registers that tell which IRQ fired. If those registers are available (LPCs have then), may just be 'true'
ampembeng 15:6f2798e45099 24 TX_IRQ_ENABLED --- checks if TX IRQs are enabled by MODSERIAL. See previous
ampembeng 15:6f2798e45099 25
ampembeng 15:6f2798e45099 26 3. A <NameOfYourFile.cpp> file needs to be added, it needs to include the ifdef(target) statement, and functions for:
ampembeng 15:6f2798e45099 27 void setBase(void) --- function that sets _base pointer to point to correct UART, and _IRQ pointer to point to correct IRQ.
ampembeng 15:6f2798e45099 28
ampembeng 15:6f2798e45099 29 void initDevice(void)--- function that allows for setting registers after everything else is initialized, if required
ampembeng 15:6f2798e45099 30
ampembeng 15:6f2798e45099 31 bool txIsBusy(void) --- function that returns true as long as long as device isn't done with transmitting
ampembeng 15:6f2798e45099 32
ampembeng 15:6f2798e45099 33 */
ampembeng 15:6f2798e45099 34