Data Structures | |
| struct | platform_8021as_time_t |
| struct | platform_i2c_config_t |
| struct | platform_i2c_message_t |
| struct | platform_rtc_time_t |
| struct | platform_spi_config_t |
| struct | platform_spi_message_segment_t |
| struct | platform_spi_slave_config |
| struct | platform_uart_config_t |
Typedefs | |
| typedef void(* | platform_gpio_irq_callback_t) (void *arg) |
| typedef struct platform_spi_slave_config | platform_spi_slave_config_t |
Functions | |
| platform_result_t | platform_adc_deinit (const platform_adc_t *adc) |
| platform_result_t | platform_adc_init (const platform_adc_t *adc, uint32_t sample_cycle) |
| platform_result_t | platform_adc_take_sample (const platform_adc_t *adc, uint16_t *output) |
| platform_result_t | platform_adc_take_sample_stream (const platform_adc_t *adc, void *buffer, uint16_t buffer_length) |
| void | platform_deinit_nanosecond_clock (void) |
| uint64_t | platform_get_nanosecond_clock_value (void) |
| platform_result_t | platform_gpio_deepsleep_wakeup_enable (const platform_gpio_t *gpio, platform_gpio_irq_trigger_t trigger) |
| platform_result_t | platform_gpio_deinit (const platform_gpio_t *gpio) |
| platform_result_t | platform_gpio_init (const platform_gpio_t *gpio, platform_pin_config_t config) |
| wiced_bool_t | platform_gpio_input_get (const platform_gpio_t *gpio) |
| platform_result_t | platform_gpio_irq_disable (const platform_gpio_t *gpio) |
| platform_result_t | platform_gpio_irq_enable (const platform_gpio_t *gpio, platform_gpio_irq_trigger_t trigger, platform_gpio_irq_callback_t handler, void *arg) |
| platform_result_t | platform_gpio_output_high (const platform_gpio_t *gpio) |
| platform_result_t | platform_gpio_output_low (const platform_gpio_t *gpio) |
| uint32_t | platform_hibernation_get_clock_freq (void) |
| uint32_t | platform_hibernation_get_max_ticks (void) |
| uint32_t | platform_hibernation_get_ticks_spent (void) |
| wiced_bool_t | platform_hibernation_is_returned_from (void) |
| platform_result_t | platform_hibernation_start (uint32_t ticks_to_wakeup) |
| platform_result_t | platform_i2c_deinit (const platform_i2c_t *i2c, const platform_i2c_config_t *config) |
| platform_result_t | platform_i2c_init (const platform_i2c_t *i2c, const platform_i2c_config_t *config) |
| platform_result_t | platform_i2c_init_combined_message (platform_i2c_message_t *message, const void *tx_buffer, void *rx_buffer, uint16_t tx_buffer_length, uint16_t rx_buffer_length, uint16_t retries, wiced_bool_t disable_dma) |
| platform_result_t | platform_i2c_init_rx_message (platform_i2c_message_t *message, void *rx_buffer, uint16_t rx_buffer_length, uint16_t retries, wiced_bool_t disable_dma) |
| platform_result_t | platform_i2c_init_tx_message (platform_i2c_message_t *message, const void *tx_buffer, uint16_t tx_buffer_length, uint16_t retries, wiced_bool_t disable_dma) |
| wiced_bool_t | platform_i2c_probe_device (const platform_i2c_t *i2c, const platform_i2c_config_t *config, int retries) |
| platform_result_t | platform_i2c_read (const platform_i2c_t *i2c, const platform_i2c_config_t *config, uint16_t flags, void *buffer, uint16_t buffer_length) |
| platform_result_t | platform_i2c_transfer (const platform_i2c_t *i2c, const platform_i2c_config_t *config, platform_i2c_message_t *messages, uint16_t number_of_messages) |
| platform_result_t | platform_i2c_write (const platform_i2c_t *i2c, const platform_i2c_config_t *config, uint16_t flags, const void *buffer, uint16_t buffer_length) |
| void | platform_init_nanosecond_clock (void) |
| platform_result_t | platform_led_set_state (int led_index, int off_on) |
| platform_result_t | platform_mcu_powersave_disable (void) |
| platform_result_t | platform_mcu_powersave_enable (void) |
| void | platform_mcu_powersave_exit_notify (void) |
| void | platform_mcu_reset (void) NORETURN |
| platform_result_t | platform_pwm_init (const platform_pwm_t *pwm, uint32_t frequency, float duty_cycle) |
| platform_result_t | platform_pwm_start (const platform_pwm_t *pwm) |
| platform_result_t | platform_pwm_stop (const platform_pwm_t *pwm) |
| void | platform_reset_nanosecond_clock (void) |
| platform_result_t | platform_rtc_get_time (platform_rtc_time_t *time) |
| platform_result_t | platform_rtc_set_time (const platform_rtc_time_t *time) |
| platform_result_t | platform_spi_chip_select_toggle (const platform_spi_t *spi, const platform_spi_config_t *config, wiced_bool_t activate) |
| platform_result_t | platform_spi_deinit (const platform_spi_t *spi) |
| platform_result_t | platform_spi_init (const platform_spi_t *spi, const platform_spi_config_t *config) |
| platform_result_t | platform_spi_slave_deinit (platform_spi_slave_driver_t *driver) |
| platform_result_t | platform_spi_slave_generate_interrupt (platform_spi_slave_driver_t *driver, uint32_t pulse_duration_ms) |
| platform_result_t | platform_spi_slave_init (platform_spi_slave_driver_t *driver, const platform_spi_t *peripheral, const platform_spi_slave_config_t *config) |
| platform_result_t | platform_spi_slave_receive_command (platform_spi_slave_driver_t *driver, platform_spi_slave_command_t *command, uint32_t timeout_ms) |
| platform_result_t | platform_spi_slave_send_error_status (platform_spi_slave_driver_t *driver, platform_spi_slave_transfer_status_t error_status) |
| platform_result_t | platform_spi_slave_transfer_data (platform_spi_slave_driver_t *driver, platform_spi_slave_transfer_direction_t direction, platform_spi_slave_data_buffer_t *buffer, uint32_t timeout_ms) |
| platform_result_t | platform_spi_transfer (const platform_spi_t *spi, const platform_spi_config_t *config, const platform_spi_message_segment_t *segments, uint16_t number_of_segments) |
| platform_result_t | platform_spi_transfer_nosetup (const platform_spi_t *spi, const platform_spi_config_t *config, const uint8_t *send_ptr, uint8_t *recv_ptr, uint32_t length) |
| platform_result_t | platform_spi_transmit (const platform_spi_t *spi, const platform_spi_config_t *config, const platform_spi_message_segment_t *segments, uint16_t number_of_segments) |
| platform_result_t | platform_stdio_init (platform_uart_driver_t *driver, const platform_uart_t *interface, const platform_uart_config_t *config) |
| platform_result_t | platform_time_disable_8021as (void) |
| platform_result_t | platform_time_enable_8021as (void) |
| platform_result_t | platform_time_read_8021as (platform_8021as_time_t *as_time) |
| platform_result_t | platform_uart_deinit (platform_uart_driver_t *driver) |
| platform_result_t | platform_uart_exception_transmit_bytes (platform_uart_driver_t *driver, const uint8_t *data_out, uint32_t size) |
| platform_result_t | platform_uart_init (platform_uart_driver_t *driver, const platform_uart_t *peripheral, const platform_uart_config_t *config, wiced_ring_buffer_t *optional_ring_buffer) |
| platform_result_t | platform_uart_powersave_sleep_handler (const platform_uart_t *peripheral) |
| platform_result_t | platform_uart_powersave_wakeup_handler (const platform_uart_t *peripheral) |
| platform_result_t | platform_uart_receive_bytes (platform_uart_driver_t *driver, uint8_t *data_in, uint32_t *expected_data_size, uint32_t timeout_ms) |
| platform_result_t | platform_uart_transmit_bytes (platform_uart_driver_t *driver, const uint8_t *data_out, uint32_t size) |
| wiced_bool_t | platform_watchdog_check_last_reset (void) |
| platform_result_t | platform_watchdog_kick (void) |
Defines generic data and enumerated types used by Platform Peripheral API Declares function prototypes for Platform peripheral API
| typedef void(* platform_gpio_irq_callback_t) (void *arg) |
GPIO interrupt callback handler GPIO interrupt callback handler
| typedef struct platform_spi_slave_config platform_spi_slave_config_t |
SPI slave configuration
GPIO interrupt trigger
Pin configuration
| platform_result_t platform_adc_deinit | ( | const platform_adc_t * | adc | ) |
Deinitialise ADC interface
| [in] | adc_interface | : adc_interface |
| platform_result_t platform_adc_init | ( | const platform_adc_t * | adc, |
| uint32_t | sample_cycle ) |
Initialise ADC interface
| [in] | adc_interface | : adc_interface |
| [in] | sample_cycle | : sample cycle |
| platform_result_t platform_adc_take_sample | ( | const platform_adc_t * | adc, |
| uint16_t * | output ) |
Take ADC sample
| [in] | adc_interface | : adc_interface |
| [out] | output | : variable that will contain the sample output |
| platform_result_t platform_adc_take_sample_stream | ( | const platform_adc_t * | adc, |
| void * | buffer, | ||
| uint16_t | buffer_length ) |
Take ADC sample
| [in] | adc_interface | : ADC interface |
| [out] | buffer | : buffer that will contain the sample stream output |
| [in] | buffer_length | : buffer length |
| void platform_deinit_nanosecond_clock | ( | void | ) |
Deinitialize nanosecond clock
| uint64_t platform_get_nanosecond_clock_value | ( | void | ) |
Get current value of nanosecond clock
| platform_result_t platform_gpio_deepsleep_wakeup_enable | ( | const platform_gpio_t * | gpio, |
| platform_gpio_irq_trigger_t | trigger ) |
Configure GPIO to wakeup MCU from deep-sleep.
| [in] | gpio | : GPIO Pin to wake up from Deep Sleep |
| [in] | trigger | : Wakeup trigger |
| platform_result_t platform_gpio_deinit | ( | const platform_gpio_t * | gpio | ) |
Deinitialise the specified GPIO pin
| [in] | gpio | : gpio pin |
| platform_result_t platform_gpio_init | ( | const platform_gpio_t * | gpio, |
| platform_pin_config_t | config ) |
Initialise the specified GPIO pin
| [in] | gpio | : gpio pin |
| [in] | config | : pin configuration |
| wiced_bool_t platform_gpio_input_get | ( | const platform_gpio_t * | gpio | ) |
Retrieve logic level of the GPIO input pin specified Use wiced_gpio_input_get_bool() to get both bool level and error info.
| [in] | gpio | : gpio pin |
| platform_result_t platform_gpio_irq_disable | ( | const platform_gpio_t * | gpio | ) |
Disable interrupt on the GPIO input pin specified
| [in] | gpio | : gpio pin |
| platform_result_t platform_gpio_irq_enable | ( | const platform_gpio_t * | gpio, |
| platform_gpio_irq_trigger_t | trigger, | ||
| platform_gpio_irq_callback_t | handler, | ||
| void * | arg ) |
Enable interrupt on the GPIO input pin specified
| [in] | gpio | : gpio pin |
| [in] | trigger | : interrupt trigger type |
| [in] | handler | : callback function that will be called when an interrupt occurs |
| [in] | arg | : argument that will be passed into the callback function |
| platform_result_t platform_gpio_output_high | ( | const platform_gpio_t * | gpio | ) |
Toggle the specified GPIO pin output high
| [in] | gpio | : gpio pin |
| platform_result_t platform_gpio_output_low | ( | const platform_gpio_t * | gpio | ) |
Toggle the specified GPIO pin output low
| [in] | gpio | : gpio pin |
| uint32_t platform_hibernation_get_clock_freq | ( | void | ) |
Return hibernation timer frequency
| uint32_t platform_hibernation_get_max_ticks | ( | void | ) |
Return maximum ticks number hibernation timer can use
| uint32_t platform_hibernation_get_ticks_spent | ( | void | ) |
Return number of ticks system spent in hibernation mode
| wiced_bool_t platform_hibernation_is_returned_from | ( | void | ) |
Return WICED_TRUE if returned from hibernation
| platform_result_t platform_hibernation_start | ( | uint32_t | ticks_to_wakeup | ) |
Enter hibernation
| [in] | ticks_to_wakeup | : how many ticks to spend in hibernation |
| platform_result_t platform_i2c_deinit | ( | const platform_i2c_t * | i2c, |
| const platform_i2c_config_t * | config ) |
Deinitialise I2C interface
| [in] | i2c_interface | : I2C interface |
| platform_result_t platform_i2c_init | ( | const platform_i2c_t * | i2c, |
| const platform_i2c_config_t * | config ) |
Initialise I2C interface
| [in] | i2c_interface | : I2C interface |
| [in] | config | : I2C configuration |
| platform_result_t platform_i2c_init_combined_message | ( | platform_i2c_message_t * | message, |
| const void * | tx_buffer, | ||
| void * | rx_buffer, | ||
| uint16_t | tx_buffer_length, | ||
| uint16_t | rx_buffer_length, | ||
| uint16_t | retries, | ||
| wiced_bool_t | disable_dma ) |
Initialise I2C combined message
| [in,out] | message | : I2C message |
| [in] | tx_buffer | : transmit buffer |
| [in] | rx_buffer | : receive buffer |
| [in] | tx_buffer_length | : transmit buffer length is bytes |
| [in] | rx_buffer_length | : receive buffer length is bytes |
| [in] | retries | : number of transmission retries |
| [in] | disable_dma | : WICED_TRUE if DMA is disabled |
| platform_result_t platform_i2c_init_rx_message | ( | platform_i2c_message_t * | message, |
| void * | rx_buffer, | ||
| uint16_t | rx_buffer_length, | ||
| uint16_t | retries, | ||
| wiced_bool_t | disable_dma ) |
Initialise I2C receive message
| [in,out] | message | : I2C message |
| [in] | rx_buffer | : receive buffer |
| [in] | rx_buffer_length | : receive buffer length is bytes |
| [in] | retries | : number of transmission retries |
| [in] | disable_dma | : WICED_TRUE if DMA is disabled |
| platform_result_t platform_i2c_init_tx_message | ( | platform_i2c_message_t * | message, |
| const void * | tx_buffer, | ||
| uint16_t | tx_buffer_length, | ||
| uint16_t | retries, | ||
| wiced_bool_t | disable_dma ) |
Initialise I2C transmit message
| [in,out] | message | : I2C message |
| [in] | tx_buffer | : transmit buffer |
| [in] | tx_buffer_length | : transmit buffer length is bytes |
| [in] | retries | : number of transmission retries |
| [in] | disable_dma | : WICED_TRUE if DMA is disabled |
| wiced_bool_t platform_i2c_probe_device | ( | const platform_i2c_t * | i2c, |
| const platform_i2c_config_t * | config, | ||
| int | retries ) |
Probe I2C slave device
| [in] | i2c_interface | : I2C interface |
| [in] | retries | : number of retries |
| platform_result_t platform_i2c_read | ( | const platform_i2c_t * | i2c, |
| const platform_i2c_config_t * | config, | ||
| uint16_t | flags, | ||
| void * | buffer, | ||
| uint16_t | buffer_length ) |
Read bytes via the I2C interface
| [in] | i2c | : I2C interface |
| [in] | config | : settings and flags used for transfer |
| [in] | flags | : flags for controlling the the transfer |
| [out] | buffer | : pointer to a receiving buffer |
| [in] | buffer_length | : length in bytes of the receiving buffer |
| platform_result_t platform_i2c_transfer | ( | const platform_i2c_t * | i2c, |
| const platform_i2c_config_t * | config, | ||
| platform_i2c_message_t * | messages, | ||
| uint16_t | number_of_messages ) |
Transfer data via the I2C interface
| [in] | i2c_interface | : I2C interface |
| [in] | messages | : pointer to an array of messages to transceive |
| [in] | number_of_messages | : number of messages in the array |
| platform_result_t platform_i2c_write | ( | const platform_i2c_t * | i2c, |
| const platform_i2c_config_t * | config, | ||
| uint16_t | flags, | ||
| const void * | buffer, | ||
| uint16_t | buffer_length ) |
Write bytes via the I2C interface
| [in] | i2c | : I2C interface |
| [in] | config | : settings and flags used for transfer |
| [in] | flags | : flags for controlling the the transfer |
| [in] | buffer | : pointer to a transmit buffer |
| [in] | buffer_length | : length in bytes of the transmit buffer |
| void platform_init_nanosecond_clock | ( | void | ) |
Initialize nanosecond clock
| platform_result_t platform_led_set_state | ( | int | led_index, |
| int | off_on ) |
Set the state of an LED
| [in] | led_index | : LED index into table in platforms/<platform>/platform.c :: platform_gpio_leds[] 0 <= led_index < PLATFORM_LED_COUNT PLATFORM_LED_COUNT defined in platforms/<platform>/platform.h |
| [in] | off_on | : 0 (WICED_LED_OFF) or 1 (WICED_LED_ON) |
| platform_result_t platform_mcu_powersave_disable | ( | void | ) |
Disable MCU powersave
| platform_result_t platform_mcu_powersave_enable | ( | void | ) |
Enable MCU powersave
| void platform_mcu_powersave_exit_notify | ( | void | ) |
Notify the software stack that MCU has exited powersave mode due to interrupt
| void platform_mcu_reset | ( | void | ) |
performs complete reset operation
| platform_result_t platform_pwm_init | ( | const platform_pwm_t * | pwm, |
| uint32_t | frequency, | ||
| float | duty_cycle ) |
Initialise PWM interface
| [in] | pwm_interface | : PWM interface |
| [in] | frequency | : PWM signal frequency in Hz |
| [in] | duty_cycle | : PWM signal duty cycle in percentage point |
| platform_result_t platform_pwm_start | ( | const platform_pwm_t * | pwm | ) |
Start generating PWM signal on the specified PWM interface
| [in] | pwm_interface | : PWM interface |
| platform_result_t platform_pwm_stop | ( | const platform_pwm_t * | pwm | ) |
Stop generating PWM signal on the specified PWM interface
| [in] | pwm_interface | : PWM interface |
| void platform_reset_nanosecond_clock | ( | void | ) |
Reset nanosecond clock
| platform_result_t platform_rtc_get_time | ( | platform_rtc_time_t * | time | ) |
Get current real-time clock
| [in] | time | : variable that will contain the current real-time clock |
| platform_result_t platform_rtc_set_time | ( | const platform_rtc_time_t * | time | ) |
Set real-time clock
| [in] | time | : real-time clock |
| platform_result_t platform_spi_chip_select_toggle | ( | const platform_spi_t * | spi, |
| const platform_spi_config_t * | config, | ||
| wiced_bool_t | activate ) |
Toggle chip-select for the specified SPI interface.
| platform_result_t platform_spi_deinit | ( | const platform_spi_t * | spi | ) |
Deinitialise the specified SPI interface
| platform_result_t platform_spi_init | ( | const platform_spi_t * | spi, |
| const platform_spi_config_t * | config ) |
Initialise the specified SPI interface
| [in] | spi_interface | : SPI interface |
| [in] | config | : SPI configuratin |
| platform_result_t platform_spi_slave_deinit | ( | platform_spi_slave_driver_t * | driver | ) |
De-initialises a SPI slave interface
| [in] | driver | : the SPI slave driver to be de-initialised |
| platform_result_t platform_spi_slave_generate_interrupt | ( | platform_spi_slave_driver_t * | driver, |
| uint32_t | pulse_duration_ms ) |
Generate an interrupt on the SPI slave interface
| [in] | driver | : the SPI slave driver |
| [in] | pulse_duration_ms | : interrupt pulse duration in milliseconds |
| platform_result_t platform_spi_slave_init | ( | platform_spi_slave_driver_t * | driver, |
| const platform_spi_t * | peripheral, | ||
| const platform_spi_slave_config_t * | config ) |
Initialises a SPI slave interface
| [in] | driver | : the SPI slave driver to be initialised |
| [in] | peripheral | : the SPI peripheral interface to be initialised |
| [in] | config | : SPI slave configuration |
| platform_result_t platform_spi_slave_receive_command | ( | platform_spi_slave_driver_t * | driver, |
| platform_spi_slave_command_t * | command, | ||
| uint32_t | timeout_ms ) |
Receive command from the remote SPI master
| [in] | driver | : the SPI slave driver |
| [out] | command | : pointer to the variable which will contained the received command |
| [in] | timeout_ms | : timeout in milliseconds |
| platform_result_t platform_spi_slave_send_error_status | ( | platform_spi_slave_driver_t * | driver, |
| platform_spi_slave_transfer_status_t | error_status ) |
Send an error status over the SPI slave interface
| [in] | driver | : the SPI slave driver |
| [in] | error_status | : SPI slave error status |
| platform_result_t platform_spi_slave_transfer_data | ( | platform_spi_slave_driver_t * | driver, |
| platform_spi_slave_transfer_direction_t | direction, | ||
| platform_spi_slave_data_buffer_t * | buffer, | ||
| uint32_t | timeout_ms ) |
Transfer data to/from the remote SPI master
| [in] | driver | : the SPI slave driver |
| [in] | direction | : transfer direction |
| [in] | buffer | : the buffer which contain the data to transfer |
| [in] | timeout_ms | : timeout in milliseconds |
| platform_result_t platform_spi_transfer | ( | const platform_spi_t * | spi, |
| const platform_spi_config_t * | config, | ||
| const platform_spi_message_segment_t * | segments, | ||
| uint16_t | number_of_segments ) |
Transfer data over the specified SPI interface
| platform_result_t platform_spi_transfer_nosetup | ( | const platform_spi_t * | spi, |
| const platform_spi_config_t * | config, | ||
| const uint8_t * | send_ptr, | ||
| uint8_t * | recv_ptr, | ||
| uint32_t | length ) |
Transfer raw data over the specified SPI interface. No prior setup (toggle chip-select, etc.) is done.
| platform_result_t platform_spi_transmit | ( | const platform_spi_t * | spi, |
| const platform_spi_config_t * | config, | ||
| const platform_spi_message_segment_t * | segments, | ||
| uint16_t | number_of_segments ) |
Transfer data to the specified SPI interface
| platform_result_t platform_stdio_init | ( | platform_uart_driver_t * | driver, |
| const platform_uart_t * | interface, | ||
| const platform_uart_config_t * | config ) |
Initialise UART standard I/O
| [in,out] | driver | : UART STDIO driver |
| [in] | interface | : UART STDIO interface |
| [in] | config | : UART STDIO configuration |
| platform_result_t platform_time_disable_8021as | ( | void | ) |
Disable the 802.1AS time functionality.
| platform_result_t platform_time_enable_8021as | ( | void | ) |
Enable the 802.1AS time functionality.
| platform_result_t platform_time_read_8021as | ( | platform_8021as_time_t * | as_time | ) |
Read the 802.1AS time.
Retrieve the origin timestamp in the last sync message, correct for the intervening interval and return the corrected time in seconds + nanoseconds. Optionally, retrieve corresponding audio time.
| [in/out] | as_time: pointer to 802.1AS structure platform_8021as_time_t |
| platform_result_t platform_uart_deinit | ( | platform_uart_driver_t * | driver | ) |
Deinitialise the specified UART port
| platform_result_t platform_uart_exception_transmit_bytes | ( | platform_uart_driver_t * | driver, |
| const uint8_t * | data_out, | ||
| uint32_t | size ) |
Transmit data over the specified UART port This should be special version of transmit function used in CPU exception context, simplest implementation without interrupts.
| platform_result_t platform_uart_init | ( | platform_uart_driver_t * | driver, |
| const platform_uart_t * | peripheral, | ||
| const platform_uart_config_t * | config, | ||
| wiced_ring_buffer_t * | optional_ring_buffer ) |
Initialise the specified UART port
| platform_result_t platform_uart_powersave_sleep_handler | ( | const platform_uart_t * | peripheral | ) |
Invoke the UART powersave sleep function
| platform_result_t platform_uart_powersave_wakeup_handler | ( | const platform_uart_t * | peripheral | ) |
Invoke the UART powersave wakeup function
| platform_result_t platform_uart_receive_bytes | ( | platform_uart_driver_t * | driver, |
| uint8_t * | data_in, | ||
| uint32_t * | expected_data_size, | ||
| uint32_t | timeout_ms ) |
Receive data over the specified UART port
| platform_result_t platform_uart_transmit_bytes | ( | platform_uart_driver_t * | driver, |
| const uint8_t * | data_out, | ||
| uint32_t | size ) |
Transmit data over the specified UART port
| wiced_bool_t platform_watchdog_check_last_reset | ( | void | ) |
Check if last reset occurred due to watchdog reset
| platform_result_t platform_watchdog_kick | ( | void | ) |
Refresh the watchdog