Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
cascoda_interface.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019, Cascoda Ltd.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  * 1. Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  * 3. Neither the name of the copyright holder nor the
13  * names of its contributors may be used to endorse or promote products
14  * derived from this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
20  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26  * POSSIBILITY OF SUCH DAMAGE.
27  */
40 #ifndef CASCODA_INTERFACE_H
41 #define CASCODA_INTERFACE_H
42 
43 #include <stdbool.h>
44 #include <stdint.h>
45 
46 #include "cascoda-bm/cascoda_bm.h"
49 #include "ca821x_api.h"
50 #include "cascoda_chili_config.h"
51 
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55 
56 #ifndef CASCODA_CHILI2_CONFIG
57 #error CASCODA_CHILI2_CONFIG has to be defined! Please include the file "cascoda_chili_config.h"
58 #endif
59 
60 /****** Enum system core clock frequency [MHz] ******/
61 typedef enum fsys_mhz
62 {
63  FSYS_4MHZ = 4,
64  FSYS_12MHZ = 12,
65  FSYS_16MHZ = 16,
66  FSYS_24MHZ = 24,
67  FSYS_32MHZ = 32,
68  FSYS_48MHZ = 48,
69  FSYS_64MHZ = 64,
70  // NOTE: The below mappings are there to clarify some of the logic in configuring the clocks.
75 #if ((CASCODA_CHILI2_CONFIG == 3) || (CASCODA_CHILI2_CONFIG == 4))
77 #else
79 #endif
81 
82 /****** Enum for wakeup condition after reset ******/
83 typedef enum wakeup_reason
84 {
92 
93 /****** Enum for deep powerdown mode flag ******/
94 typedef enum dpd_flag
95 {
100 
101 /****** Enum for system reset mode ******/
102 typedef enum sysreset_mode
103 {
107 
108 /****** Enums for module pin handling ******/
110 typedef enum module_pin_dir
111 {
113  MODULE_PIN_DIR_OUT = 1
115 
117 typedef enum module_pin_pullup
118 {
122 
125 {
129 
131 typedef enum module_pin_type
132 {
136 
138 typedef enum module_pin_irq
139 {
145 
147 {
148  P_NA = 255
149 };
150 
159 {
164  int (*callback)(void);
165 };
166 
167 /**********************************************************************/
168 /****** If LEDs are used they should be tied to VDD and pulled ******/
169 /****** to Ground with a Resistor when on to avoid Dark Current. ******/
170 /**********************************************************************/
172 {
173  LED_ON = 0,
174  LED_OFF = 1,
175 };
176 
178 {
183 };
184 //For forward compatibility, add a P_NA for every additional field in the above struct
185 #define MSP_DEFAULT P_NA, P_NA, P_NA, P_NA
186 
187 // Type for a function pointer that points to DISPATCH_ReadCA821x
188 typedef void (*dispatch_read_t)(struct ca821x_dev *pDeviceRef);
189 
192 {
199 };
200 
201 #if CASCODA_EXTERNAL_FLASHCHIP_PRESENT
202 /****************************************************/
203 /****** Variables for the external flash chip. ******/
204 /****************************************************/
205 
207 typedef struct ExternalFlashInfo
208 {
209  u32_t baseAddress;
210  u32_t readWriteLimit;
211  u16_t pageSize;
212 } ExternalFlashInfo;
213 
215 typedef ca_error (*ExternalFlashCallback)(void *aContext);
216 
218 struct ExternalFlashStatus
219 {
220  // Add more members to this structure in the future, as needed.
221  bool writeEnabled : 1;
222 };
223 
225 typedef enum ExternalFlashPartialEraseType
226 {
227  SECTOR_4KB = 0,
228  BLOCK_32KB,
229  BLOCK_64KB
230 } ExternalFlashPartialEraseType;
231 #endif
232 
233 /*******************************************************************************/
234 /****** REQUIRED Function Declarations for cascoda_bsp_*.c ******/
235 /*******************************************************************************/
236 
241 void BSP_EnableSerialIRQ(void);
242 
247 void BSP_DisableSerialIRQ(void);
248 
249 #if defined(USE_USB)
250 
257 void BSP_USBSerialWrite(u8_t *pBuffer);
258 
264 u8_t *BSP_USBSerialRxPeek(void);
265 
269 void BSP_USBSerialRxDequeue(void);
270 
271 #endif // USE_USB
272 #if defined(USE_UART)
273 
281 void BSP_SerialWriteAll(u8_t *pBuffer, u32_t BufferSize);
282 
292 u32_t BSP_SerialRead(u8_t *pBuffer, u32_t BufferSize);
293 
298 void BSP_SerialWaitWhileBusy(void);
299 
300 #endif // USE_UART
301 
310 void BSP_PowerDown(u32_t sleeptime_ms, u8_t use_timer0, dpd_flag dpd);
311 
316 void BSP_SetPowerDown(void);
317 
322 void BSP_Initialise(struct ca821x_dev *pDeviceRef);
323 
329 void BSP_UseExternalClock(u8_t useExternalClock);
330 
336 
344 
353 
362 
371 
379 
387 
399 
411 
424 
435 
447 
448 /*******************************************************************************/
451 /*******************************************************************************/
452 
457 void BSP_SystemReset(sysreset_mode resetMode);
458 
465 
469 u64_t BSP_GetUniqueId(void);
470 
475 const char *BSP_GetPlatString(void);
476 
483 u8_t BSP_GetChargeStat(void);
484 
492 
500 
507 u32_t BSP_ADCGetVolts(void);
508 
516 
523 void BSP_WatchdogEnable(u32_t timeout_ms);
524 
529 void BSP_WatchdogReset(void);
530 
535 void BSP_WatchdogDisable(void);
536 
544 
550 void BSP_EnableUSB(void);
551 
556 void BSP_DisableUSB(void);
557 
563 u8_t BSP_IsUSBPresent(void);
564 
571 
579 void BSP_SystemConfig(fsys_mhz fsys, u8_t enable_comms);
580 
585 void BSP_GetFlashInfo(struct ca_flash_info *aFlashInfoOut);
586 
598 ca_error BSP_FlashWriteInitial(u32_t startaddr, void *data, u32_t datasize);
599 
610 ca_error BSP_FlashErase(u32_t startaddr);
611 
623 ca_error BSP_FlashRead(u32_t startaddr, u32_t *data, u32_t datasize);
624 
634 void BSP_FlashLock(void);
635 
647 ca_error BSP_FlashCheck(u32_t startaddr, u32_t checklen, u32_t crc32);
648 
653 void BSP_RTCInitialise(void);
654 
662 
667 void BSP_RTCDisableAlarm(void);
668 
675 ca_error BSP_RTCSetDateAndTime(struct RTCDateAndTime dateandtime);
676 
683 void BSP_RTCGetDateAndTime(struct RTCDateAndTime *dateandtime);
684 
691 void BSP_RTCConvertSecondsToDateAndTime(i64_t seconds, struct RTCDateAndTime *dateandtime);
692 
699 i64_t BSP_RTCConvertDateAndTimeToSeconds(const struct RTCDateAndTime *dateandtime);
700 
706 void BSP_RTCRegisterCallback(int (*callback)(void));
707 
708 #if CASCODA_EXTERNAL_FLASHCHIP_PRESENT
717 void BSP_ExternalFlashInit(void);
718 
740 ca_error BSP_ExternalFlashProgram(uint32_t aStartAddress, uint8_t aNumOfBytes, uint8_t *aTxData);
741 
762 ca_error BSP_ExternalFlashReadData(uint32_t aStartAddress, uint8_t aNumOfBytes, uint8_t *aRxData);
763 
782 ca_error BSP_ExternalFlashPartialErase(ExternalFlashPartialEraseType aEraseType, uint32_t aAddress);
783 
799 
817 
834 ca_error BSP_ExternalFlashGetStatus(struct ExternalFlashStatus *status);
835 
847 ca_error BSP_ExternalFlashScheduleCallback(ExternalFlashCallback aCallback, void *aContext);
848 
854 void BSP_ExternalFlashGetInfo(struct ExternalFlashInfo *aFlashInfoOut);
855 #endif
856 
857 #ifdef __cplusplus
858 }
859 #endif
860 
865 #endif // CASCODA_BSP_H
The main ca821x-api include file.
ca_error BSP_ExternalFlashGetStatus(struct ExternalFlashStatus *status)
Definition: cascoda_bsp_w25q80dlsnig.c:805
void BSP_ExternalFlashGetInfo(struct ExternalFlashInfo *aFlashInfoOut)
Definition: cascoda_bsp_w25q80dlsnig.c:854
ca_error BSP_ExternalFlashPartialErase(ExternalFlashPartialEraseType aEraseType, uint32_t aAddress)
Definition: cascoda_bsp_w25q80dlsnig.c:731
ca_error BSP_ExternalFlashReadData(uint32_t aStartAddress, uint8_t aNumOfBytes, uint8_t *aRxData)
Definition: cascoda_bsp_w25q80dlsnig.c:708
ca_error BSP_ExternalFlashGetDeviceId(uint8_t *aId)
Definition: cascoda_bsp_w25q80dlsnig.c:788
ca_error BSP_ExternalFlashChipErase(void)
Definition: cascoda_bsp_w25q80dlsnig.c:766
void BSP_ExternalFlashInit(void)
Definition: cascoda_bsp_w25q80dlsnig.c:666
ca_error BSP_ExternalFlashProgram(uint32_t aStartAddress, uint8_t aNumOfBytes, uint8_t *aTxData)
Definition: cascoda_bsp_w25q80dlsnig.c:682
ca_error BSP_ExternalFlashScheduleCallback(ExternalFlashCallback aCallback, void *aContext)
Definition: cascoda_bsp_w25q80dlsnig.c:829
This file defines the flash interface used by settings.cpp.
Declarations for core platform abstraction functions.
unsigned long long u64_t
Definition: cascoda_types.h:52
unsigned long u32_t
Definition: cascoda_types.h:50
unsigned char u8_t
Definition: cascoda_types.h:46
signed long long i64_t
Definition: cascoda_types.h:53
signed long i32_t
Definition: cascoda_types.h:51
unsigned short u16_t
Definition: cascoda_types.h:48
void BSP_Initialise(struct ca821x_dev *pDeviceRef)
Initialise the system for a given ca821x_dev.
Definition: cascoda_bsp_chili.c:651
void BSP_DisableUSB(void)
Disable the USB.
Definition: cascoda_bsp_chili.c:766
module_pin_irq
Pin Interrupt.
Definition: cascoda_interface.h:139
void(* dispatch_read_t)(struct ca821x_dev *pDeviceRef)
Definition: cascoda_interface.h:188
void BSP_GetFlashInfo(struct ca_flash_info *aFlashInfoOut)
Get the flashinfo struct for the current platform.
Definition: cascoda_dataflash_nano120.c:62
ca_error BSP_FlashErase(u32_t startaddr)
Erases a Dataflash Memory page (All words in page set to 0xFFFFFFFF)
Definition: cascoda_dataflash_nano120.c:182
ca_error BSP_ModuleReadVoltsPin(u8_t mpin, u32_t *val)
Reads ADC Conversion Value on Module Pin.
Definition: cascoda_gpio_chili.c:622
void BSP_WatchdogDisable(void)
Watchdog Disable.
Definition: cascoda_bsp_chili.c:735
ca_error BSP_ModuleSenseGPIOPinOutput(u8_t mpin, u8_t *val)
Senses GPIO Output Value of Module Pin.
Definition: cascoda_gpio_chili.c:629
fsys_mhz
Definition: cascoda_interface.h:62
ca_error BSP_ModuleRegisterGPIOInput(struct gpio_input_args *args)
Registers GPIO Input Functionality for Module Pin.
Definition: cascoda_gpio_chili.c:297
struct ModuleSpecialPins BSP_GetModuleSpecialPins(void)
Get the struct of special pins for the platform.
Definition: cascoda_gpio_chili.c:130
void BSP_EnableUSB(void)
Enable the USB if connected.
Definition: cascoda_bsp_chili.c:753
u8_t BSP_IsUSBPresent(void)
Is the USB connected?
Definition: cascoda_bsp_chili.c:779
ca_error BSP_FlashRead(u32_t startaddr, u32_t *data, u32_t datasize)
Reads Dataflash Memory.
Definition: cascoda_dataflash_nano120.c:217
u32_t BSP_ADCGetVolts(void)
Measure and Read Battery Volts Value from ADC.
Definition: cascoda_bsp_chili.c:333
void BSP_RTCGetDateAndTime(struct RTCDateAndTime *dateandtime)
Gets RTC Date+Time.
Definition: cascoda_rtc_m2351_secure.c:332
sysreset_mode
Definition: cascoda_interface.h:103
u8_t BSP_GetVBUSConnected(void)
Get USB VBUS status (connected/not connected)
Definition: cascoda_bsp_chili.c:294
module_pin_dir
Pin Type.
Definition: cascoda_interface.h:111
u64_t BSP_GetUniqueId(void)
Get a 64-bit ID that is unique to this device.
Definition: cascoda_bsp_chili.c:247
ca_error BSP_RTCSetDateAndTime(struct RTCDateAndTime dateandtime)
Sets RTC Date+Time.
Definition: cascoda_rtc_m2351_secure.c:310
u8_t BSP_ModuleIsGPIOPinRegistered(u8_t mpin)
Checks if a Module Pin is already registered / used.
Definition: cascoda_gpio_chili.c:553
void BSP_SystemReset(sysreset_mode resetMode)
**OPTIONAL Function Declarations for cascoda_bsp_*.c
Definition: cascoda_bsp_chili.c:630
void BSP_RTCConvertSecondsToDateAndTime(i64_t seconds, struct RTCDateAndTime *dateandtime)
Converts Unix Time seconds to RTC Date+Time.
Definition: cascoda_rtc_m2351_secure.c:345
wakeup_reason BSP_GetWakeupReason(void)
Reason MCU has woken up after reset.
Definition: cascoda_bsp_chili.c:594
ca_error BSP_SetBootMode(sysreset_mode bootMode)
Set the default boot mode for the device.
Definition: cascoda_bsp_chili.c:636
void BSP_EnableSerialIRQ(void)
Enable the serial (usb/uart) irq.
Definition: cascoda_bsp_chili.c:162
module_pin_type
Pin is LED?
Definition: cascoda_interface.h:132
void BSP_DisableSerialIRQ(void)
Disable the serial (usb/uart) irq.
Definition: cascoda_bsp_chili.c:175
ca_error BSP_ModuleRegisterGPIOSharedInputOutputOD(struct gpio_input_args *args, module_pin_type isled)
Registers GPIO Input AND Open Drain Output Functionality for Module Pin.
Definition: cascoda_gpio_chili.c:428
u8_t BSP_IsWatchdogTriggered(void)
Checks if the watchdog has been triggered, clears the warning if so.
Definition: cascoda_bsp_chili.c:724
void BSP_SetPowerDown(void)
Set flag that system has started power-down sequence.
Definition: cascoda_bsp_chili.c:566
void BSP_RTCDisableAlarm(void)
Disables RTC Alarm.
Definition: cascoda_rtc_m2351_secure.c:305
ca_error BSP_ModuleDeregisterGPIOPin(u8_t mpin)
Unregisters GPIO Functionality for Module Pin to Default Settings.
Definition: cascoda_gpio_chili.c:522
ca_error BSP_FlashCheck(u32_t startaddr, u32_t checklen, u32_t crc32)
Check that a given range of flash matches the provided CRC32 checksum.
Definition: cascoda_dataflash_nano120.c:242
ca_error BSP_ModuleSetGPIOPin(u8_t mpin, u8_t val)
Sets Module Pin GPIO Output Value.
Definition: cascoda_gpio_chili.c:564
ca_error BSP_ModuleRegisterGPIOOutputOD(u8_t mpin, module_pin_type isled)
Registers GPIO Open Drain Output Functionality for Module Pin.
Definition: cascoda_gpio_chili.c:397
ca_error BSP_ModuleRegisterGPIOOutput(u8_t mpin, module_pin_type isled)
Registers GPIO Output Functionality for Module Pin.
Definition: cascoda_gpio_chili.c:366
void BSP_WatchdogReset(void)
Watchdog Reset and Restart.
Definition: cascoda_bsp_chili.c:712
module_pin_not_available
Definition: cascoda_interface.h:147
fsys_mhz BSP_GetSystemFrequency(void)
Returns the system frequency.
Definition: cascoda_bsp_chili.c:787
void BSP_FlashLock(void)
Prevent ICP access to Flash.
Definition: cascoda_bsp_chili.c:808
u8_t BSP_GetChargeStat(void)
Get Microchip MCP73831 Charge Status.
Definition: cascoda_bsp_chili.c:275
ca_error BSP_ModuleSetGPIOOutputPermanent(u8_t mpin)
Sets Module Pin GPIO Output as permanently driven (don't tristate in Power-Down)
Definition: cascoda_gpio_chili.c:602
void BSP_PowerDown(u32_t sleeptime_ms, u8_t use_timer0, dpd_flag dpd)
Set up wake on timer/IRQ, Power down MCU and return on wakeup.
Definition: cascoda_bsp_chili.c:451
module_pin_pullup
Pin Pull-Up.
Definition: cascoda_interface.h:118
void BSP_RTCInitialise(void)
Initialises RTC.
Definition: cascoda_rtc_m2351_secure.c:239
ca_error BSP_ModuleSenseGPIOPin(u8_t mpin, u8_t *val)
Senses GPIO Input Value of Module Pin.
Definition: cascoda_gpio_chili.c:583
i32_t BSP_GetTemperature(void)
Measure and Read Temperature Value.
Definition: cascoda_bsp_chili.c:302
wakeup_reason
Definition: cascoda_interface.h:84
module_pin_debounce
Pin Debounce.
Definition: cascoda_interface.h:125
ca_error BSP_FlashWriteInitial(u32_t startaddr, void *data, u32_t datasize)
Writes Dataflash Memory, relies on Memory erased.
Definition: cascoda_dataflash_nano120.c:151
i64_t BSP_RTCConvertDateAndTimeToSeconds(const struct RTCDateAndTime *dateandtime)
Converts RTC Date+Time to Unix Time seconds.
Definition: cascoda_rtc_m2351_secure.c:358
void BSP_WatchdogEnable(u32_t timeout_ms)
Watchdog Enable.
Definition: cascoda_bsp_chili.c:686
dpd_flag
Definition: cascoda_interface.h:95
const char * BSP_GetPlatString(void)
Get a string that describes this device.
Definition: cascoda_bsp_chili.c:267
void BSP_SystemConfig(fsys_mhz fsys, u8_t enable_comms)
re-configures system clock frequency and comms interface
Definition: cascoda_bsp_chili.c:795
void BSP_RTCRegisterCallback(int(*callback)(void))
Registers RTC IRQ function callback.
Definition: cascoda_rtc_m2351_secure.c:373
ca_error BSP_RTCSetAlarmSeconds(u32_t seconds)
Sets RTC Alarm in seconds from current time.
Definition: cascoda_rtc_m2351_secure.c:273
void BSP_UseExternalClock(u8_t useExternalClock)
Enable or disable the usage of the external clock from the CA821x.
Definition: cascoda_bsp_chili.c:607
module_pin_led_set
Definition: cascoda_interface.h:172
@ MODULE_PIN_IRQ_OFF
irq off
Definition: cascoda_interface.h:140
@ MODULE_PIN_IRQ_FALL
irq falling edge
Definition: cascoda_interface.h:141
@ MODULE_PIN_IRQ_BOTH
irq both edges
Definition: cascoda_interface.h:143
@ MODULE_PIN_IRQ_RISE
irq rising edge
Definition: cascoda_interface.h:142
@ FSYS_EXTERNAL_CA821X
Definition: cascoda_interface.h:71
@ FSYS_12MHZ
Definition: cascoda_interface.h:64
@ FSYS_INTERNAL_HIRC
Definition: cascoda_interface.h:73
@ FSYS_INTERNAL_HIRC48
Definition: cascoda_interface.h:74
@ FSYS_24MHZ
Definition: cascoda_interface.h:66
@ FSYS_48MHZ
Definition: cascoda_interface.h:68
@ FSYS_EXTERNAL_NUMAKER
Definition: cascoda_interface.h:72
@ FSYS_64MHZ
Definition: cascoda_interface.h:69
@ FSYS_EXTERNAL_SOURCE
Definition: cascoda_interface.h:78
@ FSYS_32MHZ
Definition: cascoda_interface.h:67
@ FSYS_4MHZ
Definition: cascoda_interface.h:63
@ FSYS_16MHZ
Definition: cascoda_interface.h:65
@ SYSRESET_APROM
Systemreset normally, into application flash.
Definition: cascoda_interface.h:104
@ SYSRESET_DFU
System reset into Device Firmware Update mode.
Definition: cascoda_interface.h:105
@ MODULE_PIN_DIR_IN
input
Definition: cascoda_interface.h:112
@ MODULE_PIN_DIR_OUT
output
Definition: cascoda_interface.h:113
@ MODULE_PIN_TYPE_GENERIC
pin not attached to LED
Definition: cascoda_interface.h:133
@ MODULE_PIN_TYPE_LED
pin is attached to LED
Definition: cascoda_interface.h:134
@ P_NA
Pin/Port functionality not available.
Definition: cascoda_interface.h:148
@ MODULE_PIN_PULLUP_OFF
pull-up off
Definition: cascoda_interface.h:119
@ MODULE_PIN_PULLUP_ON
pull-up on
Definition: cascoda_interface.h:120
@ WAKEUP_DEEP_POWERDOWN
deep-power-down (DPD) with no data retention
Definition: cascoda_interface.h:86
@ WAKEUP_RTCALARM
RTC Alarm.
Definition: cascoda_interface.h:90
@ WAKEUP_SYSRESET
System Reset.
Definition: cascoda_interface.h:89
@ WAKEUP_WATCHDOG
Watchdog Timeout.
Definition: cascoda_interface.h:87
@ WAKEUP_HARDFAULT
Hardfault.
Definition: cascoda_interface.h:88
@ WAKEUP_POWERON
power-on
Definition: cascoda_interface.h:85
@ MODULE_PIN_DEBOUNCE_OFF
debounce off
Definition: cascoda_interface.h:126
@ MODULE_PIN_DEBOUNCE_ON
debounce on
Definition: cascoda_interface.h:127
@ DPD_FLAG_NO_DPD
Definition: cascoda_interface.h:96
@ DPD_FLAG_WAKEUP_DISABLED
Definition: cascoda_interface.h:98
@ DPD_FLAG_WAKEUP_ENABLED
Definition: cascoda_interface.h:97
@ LED_ON
Definition: cascoda_interface.h:173
@ LED_OFF
Definition: cascoda_interface.h:174
ca_error
Cascoda error type.
Definition: ca821x_error.h:51
int
Definition: check_headers.py:126
args
Definition: check_headers.py:131
Definition: cascoda_interface.h:178
u8_t USB_PRESENT
Definition: cascoda_interface.h:182
u8_t SWITCH
Definition: cascoda_interface.h:179
u8_t LED_RED
Definition: cascoda_interface.h:181
u8_t LED_GREEN
Definition: cascoda_interface.h:180
Interface Structure for RTC Date and Time.
Definition: cascoda_interface.h:192
u32_t year
Year (i.e.
Definition: cascoda_interface.h:193
u32_t sec
Seconds (0-59)
Definition: cascoda_interface.h:198
u32_t hour
Hour (0-23)
Definition: cascoda_interface.h:196
u32_t month
Month (1-12)
Definition: cascoda_interface.h:194
u32_t min
Minutes (0-59)
Definition: cascoda_interface.h:197
u32_t day
Day (1-31)
Definition: cascoda_interface.h:195
CA-821x Device reference struct.
Definition: ca821x_api.h:123
Description of the internal flash.
Definition: cascoda_flash.h:47
Arguments for the BSP_ModuleRegisterGPIOInput function.
Definition: cascoda_interface.h:159
module_pin_irq irq
Which edge, if any, to trigger an interrupt on.
Definition: cascoda_interface.h:163
module_pin_debounce debounce
Whether to use debouncing.
Definition: cascoda_interface.h:162
module_pin_pullup pullup
Whether to use a pullup or not.
Definition: cascoda_interface.h:161
int(* callback)(void)
Callback called when an interrupt is triggered by this pin.
Definition: cascoda_interface.h:164
u8_t mpin
Number of the pin.
Definition: cascoda_interface.h:160