Commented out the body of bool MODSERIAL::claim (FILE *stream) since it causes problems with the latest mbed library
Dependents: ATT_Cellular_IOT_Button Avnet_ATT_Cellular_Pubnub Hiking_Pal Avnet_ATT_Cellular_IOT ... more
Fork of MODSERIAL by
AddingDevice.h
00001 /* 00002 00003 To add another device some functions/macros need to be defined. 00004 The Device folder shows examples of other devices. 00005 00006 1. In MACROS.h the include to the macro file need to be added. 00007 00008 2. A <NameOfYourFile.h> file needs to be added, it needs to include the ifdef(target) statement, and definitions for: 00009 MODSERIAL_IRQ_REG --- register which enables/disables serial IRQs 00010 DISABLE_TX_IRQ --- macro that disables TX IRQs 00011 DISABLE_RX_IRQ --- macro that disables RX IRQs 00012 ENABLE_TX_IRQ --- macro that enables TX IRQs 00013 ENABLE_RX_IRQ --- macro that enables RX IRQs 00014 00015 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 00016 RESET_RX_FIFO --- macro that resets RX FIFO buffer, if no hardware options, you can also read data until no more data is available 00017 00018 MODSERIAL_READ_REG --- register where RX data is in 00019 MODSERIAL_WRITE_REG --- register where TX data is in (can be same as previous) 00020 MODSERIAL_READABLE --- returns true if new data is available in read_reg 00021 MODSERIAL_WRITABLE --- returns true if we may write new data in write_reg 00022 00023 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' 00024 TX_IRQ_ENABLED --- checks if TX IRQs are enabled by MODSERIAL. See previous 00025 00026 3. A <NameOfYourFile.cpp> file needs to be added, it needs to include the ifdef(target) statement, and functions for: 00027 void setBase(void) --- function that sets _base pointer to point to correct UART, and _IRQ pointer to point to correct IRQ. 00028 00029 void initDevice(void)--- function that allows for setting registers after everything else is initialized, if required 00030 00031 bool txIsBusy(void) --- function that returns true as long as long as device isn't done with transmitting 00032 00033 */ 00034
Generated on Tue Jul 12 2022 20:12:02 by 1.7.2