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