Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
sif_btn_ext_pi4ioe5v96248.h File Reference
#include "cascoda-bm/cascoda_types.h"
#include "ca821x_api.h"
#include "ca821x_error.h"
#include "cascoda_btn_ext.h"
Include dependency graph for sif_btn_ext_pi4ioe5v96248.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SIF_SetButtonShortPressCallbackExt   Btn_SetButtonShortPressCallbackExt
 
#define SIF_SetButtonLongPressCallbackExt   Btn_SetButtonLongPressCallbackExt
 
#define SIF_SetButtonHoldCallbackExt   Btn_SetButtonHoldCallbackExt
 

Functions

ca_error SIF_InitialiseGPIOExt (void)
 Initialise GPIO extender. More...
 
ca_error SIF_RegisterOutputExt (uint8_t ledBtn)
 Set the functionality of an output/LED to be an output. More...
 
ca_error SIF_SetOutputExt (uint8_t ledBtn, u8_t val)
 Set the state of the output/LED. More...
 
ca_error SIF_RegisterButtonInputExt (uint8_t ledBtn)
 Set the functionality of a button to be an input. More...
 
ca_error SIF_RegisterGeneralInputExt (uint8_t ledBtn, uint8_t pullup_on)
 Set the functionality to be a general input (no interrupt, polling only) More...
 
ca_error SIF_DeRegisterExt (uint8_t ledBtn)
 De-Register an LED or Button Pin. More...
 
ca_error SIF_SenseExt (uint8_t ledBtn, u8_t *val)
 Get the state of the input/Button. More...
 
ca_error SIF_SenseOutputExt (uint8_t ledBtn, u8_t *val)
 Get the state of the output/LED. More...
 
ca_error SIF_SenseAllExt (u8_t *values)
 Get the state all buttons. More...
 
ca_error SIF_PollButtonsExt (void)
 Main polling function to activate callbacks for any buttons that are currently being pressed. More...
 
bool SIF_CanSleepExt (void)
 Check if all buttons have been handled. More...
 

Macro Definition Documentation

◆ SIF_SetButtonHoldCallbackExt

#define SIF_SetButtonHoldCallbackExt   Btn_SetButtonHoldCallbackExt

◆ SIF_SetButtonLongPressCallbackExt

#define SIF_SetButtonLongPressCallbackExt   Btn_SetButtonLongPressCallbackExt

◆ SIF_SetButtonShortPressCallbackExt

#define SIF_SetButtonShortPressCallbackExt   Btn_SetButtonShortPressCallbackExt

Function Documentation

◆ SIF_CanSleepExt()

bool SIF_CanSleepExt ( void  )

Check if all buttons have been handled.

Returns
true/false

◆ SIF_DeRegisterExt()

ca_error SIF_DeRegisterExt ( uint8_t  ledBtn)

De-Register an LED or Button Pin.

Parameters
ledBtn- reference to LED/Button
Returns
status

◆ SIF_InitialiseGPIOExt()

ca_error SIF_InitialiseGPIOExt ( void  )

Initialise GPIO extender.

Returns
status

◆ SIF_PollButtonsExt()

ca_error SIF_PollButtonsExt ( void  )

Main polling function to activate callbacks for any buttons that are currently being pressed.

Returns
status

◆ SIF_RegisterButtonInputExt()

ca_error SIF_RegisterButtonInputExt ( uint8_t  ledBtn)

Set the functionality of a button to be an input.

Parameters
ledBtn- reference to button
Returns
status

◆ SIF_RegisterGeneralInputExt()

ca_error SIF_RegisterGeneralInputExt ( uint8_t  ledBtn,
uint8_t  pullup_on 
)

Set the functionality to be a general input (no interrupt, polling only)

Parameters
ledBtn- reference number to input
pullup_on- pull-up enabled when (1)
Returns
status

◆ SIF_RegisterOutputExt()

ca_error SIF_RegisterOutputExt ( uint8_t  ledBtn)

Set the functionality of an output/LED to be an output.

Parameters
ledBtn- reference to output/LED
Returns
status

◆ SIF_SenseAllExt()

ca_error SIF_SenseAllExt ( u8_t values)

Get the state all buttons.

Parameters
values- the state of all buttons
Returns
status

◆ SIF_SenseExt()

ca_error SIF_SenseExt ( uint8_t  ledBtn,
u8_t val 
)

Get the state of the input/Button.

Parameters
ionr- I/O number
val- the state of the input/Button
Returns
status

◆ SIF_SenseOutputExt()

ca_error SIF_SenseOutputExt ( uint8_t  ledBtn,
u8_t val 
)

Get the state of the output/LED.

Parameters
ionr- I/O number
val- the state of the output/LED
Returns
status

◆ SIF_SetOutputExt()

ca_error SIF_SetOutputExt ( uint8_t  ledBtn,
u8_t  val 
)

Set the state of the output/LED.

Parameters
ledBtn- reference to output/LED
val- the state of the output/LED
Returns
status