Si446x Radio SPI Driver#
Provide functions to control Si4446x Radio via SPI interface.
Enumerations#
Device GPIO Capabilities.
Device interrupt depth state.
Typedefs#
Event Handler callback type.
Variables#
Device SPI driver configuration.
Device SPI driver instance handle (pointer)
Functions#
Initialize Device GPIOs.
Decrement interrupt nesting level and, if 0, enable device interrupt.
Macros#
Power down the device per GPIO.
Power up the device per GPIO.
Indicate if the device is ready per GPIO.
Indicate if the device is not ready per GPIO.
Wait for the device to become ready per GPIO.
Select the external device.
Unselect the external device.
Indicate if the device is selected.
Indicate if the device is not selected.
Indicate if device interrupt GPIO is pending.
Indicate if device interrupt is not pending.
Disable device interrupt and increment interrupt nesting level.
Specifies GPIO pin polarity is inverted (assert = low)
Specifies GPIO pin polarity is normal (assert = high)
Enumeration Documentation#
sl_ext_device_config_t#
sl_ext_device_config_t
Device GPIO Capabilities.
Enumerator | |
---|---|
SL_EXT_DEVICE_HAS_NOTHING | Not any of the others. |
SL_EXT_DEVICE_HAS_POWER | Device has power input pin. |
SL_EXT_DEVICE_HAS_READY | Device has ready output pin. |
SL_EXT_DEVICE_HAS_SELECT | Device has select input pin. |
SL_EXT_DEVICE_HAS_INTERRUPT | Device has interrupt output pin. |
SL_EXT_DEVICE_HAS_READY_IRQ | An IRQ is assigned to ready pin. |
SL_EXT_DEVICE_HAS_INTERRUPT_IRQ | An IRQ is assigned to interrupt pin. |
58
of file hardware/driver/si446x_radio/inc/sl_si446x_radio.h
sl_ext_device_interrupt_depth_t#
sl_ext_device_interrupt_depth_t
Device interrupt depth state.
Enumerator | |
---|---|
SL_EXT_DEVICE_INTERRUPT_DEPTH_ON | Interrupt is enabled. |
SL_EXT_DEVICE_INTERRUPT_DEPTH_OFF | Interrupt lowest depth disabled. |
SL_EXT_DEVICE_INTERRUPT_UNCONFIGURED | Interrupt is not configured. |
80
of file hardware/driver/si446x_radio/inc/sl_si446x_radio.h
Typedef Documentation#
sl_ext_device_handler_t#
typedef void(* sl_ext_device_handler_t) (void) )(void)
Event Handler callback type.
53
of file hardware/driver/si446x_radio/inc/sl_si446x_radio.h
Variable Documentation#
sl_ext_device_spi_config#
const SPIDRV_Init_t sl_ext_device_spi_config
Device SPI driver configuration.
121
of file hardware/driver/si446x_radio/inc/sl_si446x_radio.h
sl_ext_device_spi_handle#
SPIDRV_Handle_t sl_ext_device_spi_handle
Device SPI driver instance handle (pointer)
125
of file hardware/driver/si446x_radio/inc/sl_si446x_radio.h
Function Documentation#
sl_ext_device_init#
sl_ext_device_config_t sl_ext_device_init (sl_ext_device_handler_t interrupt_handler, sl_ext_device_handler_t ready_handler)
Initialize Device GPIOs.
N/A | interrupt_handler | The handler for device general interrupt (NULL to disable) |
N/A | ready_handler | The handler for device ready interrupt (NULL to disable) |
Returns
bitmask of configured features for this device
Note
First initialization after bootup leaves the device powered down and unselected. Subsequent inits don't touch the device powered or selected states and can be used to reconfigure callback(s), which always clears any stale/pending events. For ready_handler its interrupt is enabled upon configuration; for interrupt_handler sl_ext_device_enable_interrupt() must subsequently be called to enable it.
143
of file hardware/driver/si446x_radio/inc/sl_si446x_radio.h
sl_ext_device_enable_interrupt#
sl_ext_device_interrupt_depth_t sl_ext_device_enable_interrupt (bool clearPending)
Decrement interrupt nesting level and, if 0, enable device interrupt.
N/A | clearPending | if true clears any "stale" pending interrupt just prior to enabling device interrupt. |
Returns
interrupt level prior to enabling (0=interrupts were enabled)
214
of file hardware/driver/si446x_radio/inc/sl_si446x_radio.h
Macro Definition Documentation#
sl_ext_device_power_down#
#define sl_ext_device_power_downValue:
(void)
Power down the device per GPIO.
102
of file hardware/driver/si446x_radio/inc/sl_si446x_radio.h
sl_ext_device_power_up#
#define sl_ext_device_power_upValue:
(void)
Power up the device per GPIO.
103
of file hardware/driver/si446x_radio/inc/sl_si446x_radio.h
sl_ext_device_is_ready#
#define sl_ext_device_is_readyValue:
(void)
Indicate if the device is ready per GPIO.
Returns
true if device is ready, false otherwise
104
of file hardware/driver/si446x_radio/inc/sl_si446x_radio.h
sl_ext_device_not_ready#
#define sl_ext_device_not_readyValue:
(void)
Indicate if the device is not ready per GPIO.
Returns
true if device is not ready, false otherwise
105
of file hardware/driver/si446x_radio/inc/sl_si446x_radio.h
sl_ext_device_wait_ready#
#define sl_ext_device_wait_readyValue:
(void)
Wait for the device to become ready per GPIO.
106
of file hardware/driver/si446x_radio/inc/sl_si446x_radio.h
sl_ext_device_select#
#define sl_ext_device_selectValue:
(void)
Select the external device.
107
of file hardware/driver/si446x_radio/inc/sl_si446x_radio.h
sl_ext_device_deselect#
#define sl_ext_device_deselectValue:
(void)
Unselect the external device.
108
of file hardware/driver/si446x_radio/inc/sl_si446x_radio.h
sl_ext_device_is_selected#
#define sl_ext_device_is_selectedValue:
(void)
Indicate if the device is selected.
109
of file hardware/driver/si446x_radio/inc/sl_si446x_radio.h
sl_ext_device_not_selected#
#define sl_ext_device_not_selectedValue:
(void)
Indicate if the device is not selected.
110
of file hardware/driver/si446x_radio/inc/sl_si446x_radio.h
sl_ext_device_is_interrupt_pending#
#define sl_ext_device_is_interrupt_pendingValue:
(void)
Indicate if device interrupt GPIO is pending.
Returns
true if device interrupt is pending, false otherwise
111
of file hardware/driver/si446x_radio/inc/sl_si446x_radio.h
sl_ext_device_no_interrupt_pending#
#define sl_ext_device_no_interrupt_pendingValue:
(void)
Indicate if device interrupt is not pending.
Returns
true if device interrupt is not pending, false otherwise
112
of file hardware/driver/si446x_radio/inc/sl_si446x_radio.h
sl_ext_device_disable_interrupt#
#define sl_ext_device_disable_interruptValue:
(void)
Disable device interrupt and increment interrupt nesting level.
Returns
interrupt level prior to disabling (0=interrupts were enabled)
113
of file hardware/driver/si446x_radio/inc/sl_si446x_radio.h
SL_EXT_DEVICE_POLARITY_INVERT#
#define SL_EXT_DEVICE_POLARITY_INVERTValue:
false
Specifies GPIO pin polarity is inverted (assert = low)
94
of file hardware/driver/si446x_radio/inc/sl_si446x_radio.h
SL_EXT_DEVICE_POLARITY_NORMAL#
#define SL_EXT_DEVICE_POLARITY_NORMALValue:
true
Specifies GPIO pin polarity is normal (assert = high)
97
of file hardware/driver/si446x_radio/inc/sl_si446x_radio.h
sl_ext_device_init#
#define sl_ext_device_initValue:
sl_si446x_init
101
of file hardware/driver/si446x_radio/inc/sl_si446x_radio.h
sl_ext_device_enable_interrupt#
#define sl_ext_device_enable_interruptValue:
sl_si446x_enable_interrupt
114
of file hardware/driver/si446x_radio/inc/sl_si446x_radio.h
sl_ext_device_spi_config#
#define sl_ext_device_spi_configValue:
sl_si446x_spi_config
115
of file hardware/driver/si446x_radio/inc/sl_si446x_radio.h