5.11.0.0R3
Software Development Kit
 
Loading...
Searching...
No Matches
wiced_platform.h File Reference

Data Structures

struct  wiced_i2c_device_t
 
struct  wiced_spi_device_t
 

Typedefs

typedef platform_8021as_time_t wiced_8021as_time_t
 
typedef platform_pin_config_t wiced_gpio_config_t
 
typedef platform_gpio_irq_callback_t wiced_gpio_irq_handler_t
 
typedef platform_gpio_irq_trigger_t wiced_gpio_irq_trigger_t
 
typedef platform_i2c_bus_address_width_t wiced_i2c_bus_address_width_t
 
typedef platform_i2c_message_t wiced_i2c_message_t
 
typedef platform_i2c_speed_mode_t wiced_i2c_speed_mode_t
 
typedef platform_rtc_time_t wiced_rtc_time_t
 
typedef platform_spi_message_segment_t wiced_spi_message_segment_t
 
typedef platform_spi_slave_command_t wiced_spi_slave_command_t
 
typedef platform_spi_slave_config_t wiced_spi_slave_config_t
 
typedef platform_spi_slave_data_buffer_t wiced_spi_slave_data_buffer_t
 
typedef platform_spi_slave_transfer_direction_t wiced_spi_slave_transfer_direction_t
 
typedef platform_spi_slave_transfer_status_t wiced_spi_slave_transfer_status_t
 
typedef platform_uart_config_t wiced_uart_config_t
 

Enumerations

enum  wiced_active_state_t { WICED_ACTIVE_LOW = 0 , WICED_ACTIVE_HIGH = 1 }
 
enum  wiced_led_index_t {
  WICED_LED_INDEX_1 = 0 , WICED_LED_INDEX_2 , WICED_LED_INDEX_3 , WICED_LED_INDEX_4 ,
  WICED_LED_INDEX_MAX
}
 
enum  wiced_led_state_t { WICED_LED_OFF = 0 , WICED_LED_ON }
 

Functions

wiced_result_t wiced_adc_deinit (wiced_adc_t adc)
 
wiced_result_t wiced_adc_init (wiced_adc_t adc, uint32_t sampling_cycle)
 
wiced_result_t wiced_adc_take_sample (wiced_adc_t adc, uint16_t *output)
 
wiced_result_t wiced_adc_take_sample_stream (wiced_adc_t adc, void *buffer, uint16_t buffer_length)
 
wiced_result_t wiced_audio_timer_disable (void)
 
wiced_result_t wiced_audio_timer_enable (uint32_t audio_frame_count)
 
wiced_result_t wiced_audio_timer_get_frame_sync (uint32_t timeout_msecs)
 
wiced_result_t wiced_audio_timer_get_nanoseconds (uint32_t audio_sample_rate, uint32_t *audio_time_secs, uint32_t *audio_time_nanosecs)
 
wiced_result_t wiced_audio_timer_get_resolution (uint32_t audio_sample_rate, uint32_t *ticks_per_sec)
 
wiced_result_t wiced_audio_timer_get_time (uint32_t *time_hi, uint32_t *time_lo)
 
wiced_result_t wiced_gpio_deepsleep_wakeup_enable (wiced_gpio_t gpio, wiced_gpio_irq_trigger_t trigger)
 
wiced_result_t wiced_gpio_deinit (wiced_gpio_t gpio)
 
wiced_result_t wiced_gpio_init (wiced_gpio_t gpio, wiced_gpio_config_t configuration)
 
wiced_bool_t wiced_gpio_input_get (wiced_gpio_t gpio)
 
wiced_result_t wiced_gpio_input_get_bool (wiced_gpio_t gpio, wiced_bool_t *value)
 
wiced_result_t wiced_gpio_input_irq_disable (wiced_gpio_t gpio)
 
wiced_result_t wiced_gpio_input_irq_enable (wiced_gpio_t gpio, wiced_gpio_irq_trigger_t trigger, wiced_gpio_irq_handler_t handler, void *arg)
 
wiced_result_t wiced_gpio_output_high (wiced_gpio_t gpio)
 
wiced_result_t wiced_gpio_output_low (wiced_gpio_t gpio)
 
wiced_result_t wiced_i2c_deinit (const wiced_i2c_device_t *device)
 
wiced_result_t wiced_i2c_init (const wiced_i2c_device_t *device)
 
wiced_result_t wiced_i2c_init_combined_message (wiced_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)
 
wiced_result_t wiced_i2c_init_rx_message (wiced_i2c_message_t *message, void *rx_buffer, uint16_t rx_buffer_length, uint16_t retries, wiced_bool_t disable_dma)
 
wiced_result_t wiced_i2c_init_tx_message (wiced_i2c_message_t *message, const void *tx_buffer, uint16_t tx_buffer_length, uint16_t retries, wiced_bool_t disable_dma)
 
wiced_bool_t wiced_i2c_probe_device (const wiced_i2c_device_t *device, int retries)
 
wiced_result_t wiced_i2c_read (const wiced_i2c_device_t *device, uint16_t flags, void *buffer, uint16_t buffer_length)
 
wiced_result_t wiced_i2c_transfer (const wiced_i2c_device_t *device, wiced_i2c_message_t *message, uint16_t number_of_messages)
 
wiced_result_t wiced_i2c_write (const wiced_i2c_device_t *device, uint16_t flags, const void *buffer, uint16_t buffer_length)
 
wiced_result_t wiced_led_set_state (wiced_led_index_t led_index, wiced_led_state_t off_on)
 
wiced_result_t wiced_platform_get_rtc_time (wiced_rtc_time_t *time)
 
void wiced_platform_mcu_disable_powersave (void)
 
void wiced_platform_mcu_enable_powersave (void)
 
wiced_result_t wiced_platform_set_rtc_time (const wiced_rtc_time_t *time)
 
wiced_result_t wiced_pwm_init (wiced_pwm_t pwm, uint32_t frequency, float duty_cycle)
 
wiced_result_t wiced_pwm_start (wiced_pwm_t pwm)
 
wiced_result_t wiced_pwm_stop (wiced_pwm_t pwm)
 
wiced_result_t wiced_spi_deinit (const wiced_spi_device_t *spi)
 
wiced_result_t wiced_spi_init (const wiced_spi_device_t *spi)
 
wiced_result_t wiced_spi_slave_deinit (wiced_spi_t spi)
 
wiced_result_t wiced_spi_slave_generate_interrupt (wiced_spi_t spi, uint32_t pulse_duration_ms)
 
wiced_result_t wiced_spi_slave_init (wiced_spi_t spi, const wiced_spi_slave_config_t *config)
 
wiced_result_t wiced_spi_slave_receive_command (wiced_spi_t spi, wiced_spi_slave_command_t *command, uint32_t timeout_ms)
 
wiced_result_t wiced_spi_slave_send_error_status (wiced_spi_t spi, wiced_spi_slave_transfer_status_t error_status)
 
wiced_result_t wiced_spi_slave_transfer_data (wiced_spi_t spi, wiced_spi_slave_transfer_direction_t direction, wiced_spi_slave_data_buffer_t *buffer, uint32_t timeout_ms)
 
wiced_result_t wiced_spi_transfer (const wiced_spi_device_t *spi, const wiced_spi_message_segment_t *segments, uint16_t number_of_segments)
 
wiced_result_t wiced_spi_transmit (const wiced_spi_device_t *spi, const wiced_spi_message_segment_t *segments, uint16_t number_of_segments)
 
wiced_result_t wiced_time_disable_8021as (void)
 
wiced_result_t wiced_time_enable_8021as (void)
 
wiced_result_t wiced_time_read_8021as (wiced_8021as_time_t *as_time)
 
wiced_result_t wiced_uart_deinit (wiced_uart_t uart)
 
wiced_result_t wiced_uart_init (wiced_uart_t uart, const wiced_uart_config_t *config, wiced_ring_buffer_t *optional_rx_buffer)
 
wiced_result_t wiced_uart_receive_bytes (wiced_uart_t uart, void *data, uint32_t *size, uint32_t timeout)
 
wiced_result_t wiced_uart_transmit_bytes (wiced_uart_t uart, const void *data, uint32_t size)
 
wiced_result_t wiced_watchdog_kick (void)
 

Detailed Description

Defines functions that access platform specific peripherals

Typedef Documentation

◆ wiced_8021as_time_t

◆ wiced_gpio_config_t

GPIO configuration

◆ wiced_gpio_irq_handler_t

◆ wiced_gpio_irq_trigger_t

◆ wiced_i2c_bus_address_width_t

◆ wiced_i2c_message_t

◆ wiced_i2c_speed_mode_t

◆ wiced_rtc_time_t

◆ wiced_spi_message_segment_t

◆ wiced_spi_slave_command_t

typedef platform_spi_slave_command_t wiced_spi_slave_command_t

SPI slave command

◆ wiced_spi_slave_config_t

SPI Slave configuration

◆ wiced_spi_slave_data_buffer_t

typedef platform_spi_slave_data_buffer_t wiced_spi_slave_data_buffer_t

SPI slave data

◆ wiced_spi_slave_transfer_direction_t

◆ wiced_spi_slave_transfer_status_t

◆ wiced_uart_config_t

UART configuration

Enumeration Type Documentation

◆ wiced_active_state_t

Enumerator
WICED_ACTIVE_LOW 

ACTIVE LOW

WICED_ACTIVE_HIGH 

ACTIVE HIGH

◆ wiced_led_index_t

Enumerator
WICED_LED_INDEX_1 

LED INDEX 1

WICED_LED_INDEX_2 

LED INDEX 2

WICED_LED_INDEX_3 

LED INDEX 3

WICED_LED_INDEX_4 

LED INDEX 4

WICED_LED_INDEX_MAX 

denotes end of list - do not use

◆ wiced_led_state_t

Enumerator
WICED_LED_OFF 

OFF

WICED_LED_ON 

ON

Function Documentation

◆ wiced_audio_timer_disable()

wiced_result_t wiced_audio_timer_disable ( void )

Disable audio timer

Returns
WICED_SUCCESS : on success.
WICED_ERROR : if an error occurred with any step

◆ wiced_audio_timer_enable()

wiced_result_t wiced_audio_timer_enable ( uint32_t audio_frame_count)

Enable audio timer

Parameters
[in]audio_frame_count: Audio timer interrupts period expressed in number of audio samples/frames
Returns
WICED_SUCCESS : on success.
WICED_ERROR : if an error occurred with any step

◆ wiced_audio_timer_get_frame_sync()

wiced_result_t wiced_audio_timer_get_frame_sync ( uint32_t timeout_msecs)

Wait for audio timer frame sync event

Parameters
[in]timeout_msecs: Timeout value in msecs; WICED_NO_WAIT or WICED_WAIT_FOREVER otherwise.
Returns
WICED_SUCCESS : on success.
WICED_ERROR : if an error occurred with any step

◆ wiced_audio_timer_get_nanoseconds()

wiced_result_t wiced_audio_timer_get_nanoseconds ( uint32_t audio_sample_rate,
uint32_t * audio_time_secs,
uint32_t * audio_time_nanosecs )

Read audio timer value in seconds and nanoseconds; a valid audio sample rate needs to be provided

Parameters
[in]audio_sample_rate: sample rate of audio platback/capture
[out]audio_time_secs: returned time seconds
[out]audio_time_nanosecs: returned time nanoseconds portion
Returns
WICED_SUCCESS : on success.
WICED_ERROR : if an error occurred with any step

◆ wiced_audio_timer_get_resolution()

wiced_result_t wiced_audio_timer_get_resolution ( uint32_t audio_sample_rate,
uint32_t * ticks_per_sec )

Get audio timer resolution (ticks per second)

Parameters
[in]audio_sample_rate: Audio sample rate
[out]ticks_per_sec: Returned audio timer resolution
Returns
WICED_SUCCESS : on success.
WICED_ERROR : if an error occurred with any step

◆ wiced_audio_timer_get_time()

wiced_result_t wiced_audio_timer_get_time ( uint32_t * time_hi,
uint32_t * time_lo )

Read audio timer value (tick count)

Parameters
[out]time_hi: Upper 32-bit of 64-bit audio timer ticks
[out]time_lo: Lower 32-bit of 64-bit audio timer ticks
Returns
WICED_SUCCESS : on success.
WICED_ERROR : if an error occurred with any step

◆ wiced_platform_get_rtc_time()

wiced_result_t wiced_platform_get_rtc_time ( wiced_rtc_time_t * time)

This function will return the value of time read from the on board CPU real time clock. Time value must be given in the format of the structure wiced_rtc_time_t

Parameters
[out]time: Pointer to a time structure
Returns
WICED_SUCCESS : on success.
WICED_ERROR : if an error occurred with any step

◆ wiced_platform_set_rtc_time()

wiced_result_t wiced_platform_set_rtc_time ( const wiced_rtc_time_t * time)

This function will set MCU RTC time to a new value. Time value must be given in the format of the structure wiced_rtc_time_t

Parameters
[in]time: Pointer to a time structure
Returns
WICED_SUCCESS : on success.
WICED_ERROR : if an error occurred with any step

◆ wiced_time_disable_8021as()

wiced_result_t wiced_time_disable_8021as ( void )

Disable the 802.1AS time functionality.

Returns
WICED_SUCCESS : on success.
WICED_ERROR : if an error occurred with any step

◆ wiced_time_enable_8021as()

wiced_result_t wiced_time_enable_8021as ( void )

Enable the 802.1AS time functionality.

Returns
WICED_SUCCESS : on success.
WICED_ERROR : if an error occurred with any step

◆ wiced_time_read_8021as()

wiced_result_t wiced_time_read_8021as ( wiced_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 (master) time in seconds + nanoseconds. Optionally, retrieve corresponding audio time.

Note
If no sync messages have been received, master time and local time will be the same.
Parameters
[in/out]as_time: pointer to 802.1AS structure wiced_8021as_time_t
Returns
wiced_result_t