5.11.0.0R3
Software Development Kit
 
Loading...
Searching...
No Matches
Platform Interface

Bus Functions

Functions that enable WICED to start and stop the hardware communications bus for a paritcular platform.

wwd_result_t host_platform_bus_init (void)
 
wwd_result_t host_platform_bus_deinit (void)
 
void wwd_thread_notify_irq (void)
 
wwd_result_t host_platform_bus_enable_interrupt (void)
 
wwd_result_t host_platform_bus_disable_interrupt (void)
 
void host_platform_bus_buffer_freed (wwd_buffer_dir_t direction)
 

General Platform Functions

Functions that enable WICED to use the hardware platform.

void host_platform_reset_wifi (wiced_bool_t reset_asserted)
 
void host_platform_power_wifi (wiced_bool_t power_enabled)
 
wwd_result_t host_platform_init (void)
 
wwd_result_t host_platform_deinit (void)
 
void host_platform_clocks_needed (void)
 
void host_platform_clocks_not_needed (void)
 
wwd_result_t host_platform_get_mac_address (wiced_mac_t *mac)
 
wwd_result_t host_platform_get_ethernet_mac_address (wiced_mac_t *mac)
 
uint32_t host_platform_get_cycle_count (void)
 
wiced_bool_t host_platform_is_in_interrupt_context (void)
 

SDIO Bus Functions

Functions that enable WICED to use an SDIO bus on a particular hardware platform.

wwd_result_t host_platform_sdio_transfer (wwd_bus_transfer_direction_t direction, sdio_command_t command, sdio_transfer_mode_t mode, sdio_block_size_t block_size, uint32_t argument, uint32_t *data, uint16_t data_size, sdio_response_needed_t response_expected, uint32_t *response)
 
wwd_result_t host_platform_sdio_enumerate (void)
 
wwd_result_t host_platform_enable_high_speed_sdio (void)
 
void sdio_irq (void)
 
wwd_result_t host_platform_unmask_sdio_interrupt (void)
 
wwd_result_t host_enable_oob_interrupt (void)
 
uint8_t host_platform_get_oob_interrupt_pin (void)
 

Detailed Description

Enables WICED to use the hardware platform.

Function Documentation

◆ host_enable_oob_interrupt()

wwd_result_t host_enable_oob_interrupt ( void )
extern

SDIO Out-of-band interrupt handler

This function should enable the detection of an external interrupt from the GPIO0 pin of the WLAN chip.

◆ host_platform_bus_buffer_freed()

void host_platform_bus_buffer_freed ( wwd_buffer_dir_t direction)
extern

Informs the platform bus implementation that a buffer has been freed

This function is called by WICED during buffer release to allow the platform to reuse the released buffer - especially where a DMA chain needs to be refilled.

◆ host_platform_bus_deinit()

wwd_result_t host_platform_bus_deinit ( void )
extern

De-Initializes the WICED Bus

Implemented in the WICED Platform interface which is specific to the platform in use. This function does the reverse of host_platform_bus_init

Returns
WWD_SUCCESS or Error code

◆ host_platform_bus_disable_interrupt()

wwd_result_t host_platform_bus_disable_interrupt ( void )
extern

Disables the bus interrupt

This function is called by WICED during de-init, to stop the system supplying any more interrupts in preparation for shutdown

◆ host_platform_bus_enable_interrupt()

wwd_result_t host_platform_bus_enable_interrupt ( void )
extern

Enables the bus interrupt

This function is called by WICED during init, once the system is ready to receive interrupts

◆ host_platform_bus_init()

wwd_result_t host_platform_bus_init ( void )
extern

Initializes the WICED Bus

Implemented in the WICED Platform interface which is specific to the platform in use. This function should set the bus GPIO pins to the correct modes, set up the interrupts for the WICED bus, enable power and clocks to the bus, and set up the bus peripheral.

Returns
WWD_SUCCESS or Error code

◆ host_platform_clocks_needed()

void host_platform_clocks_needed ( void )
extern

Disable power saving modes that would stop clocks

◆ host_platform_clocks_not_needed()

void host_platform_clocks_not_needed ( void )
extern

Enable power saving modes that would stop clocks

◆ host_platform_deinit()

wwd_result_t host_platform_deinit ( void )
extern

De-Initialises platform for WICED

Does the opposite to the host_platform_init function, leaving the Broadcom Wi-Fi in a powered down, reset state.

Returns
WWD_SUCCESS or Error code

◆ host_platform_enable_high_speed_sdio()

wwd_result_t host_platform_enable_high_speed_sdio ( void )
extern

Switch SDIO bus to high speed mode

When SDIO starts, it must be in a low speed mode This function switches it to high speed mode (up to 50MHz)

◆ host_platform_get_cycle_count()

uint32_t host_platform_get_cycle_count ( void )
extern

Returns the current CPU cycle count.

This function is used to accurately calculate sub-systick timing.

◆ host_platform_get_ethernet_mac_address()

wwd_result_t host_platform_get_ethernet_mac_address ( wiced_mac_t * mac)
extern

Returns Ethernet MAC address

Parameters
mac: A wiced_mac_t pointer to the Ethernet MAC address

◆ host_platform_get_mac_address()

wwd_result_t host_platform_get_mac_address ( wiced_mac_t * mac)
extern

The host MCU can provide a MAC address to the Wi-Fi driver (rather than the driver using the MAC in NVRAM or OTP). To use this functionality, add a global define (MAC_ADDRESS_SET_BY_HOST) in the application makefile. Further information is available in the generated_mac_address.txt file that is created during the application build process.

Parameters
mac: A wiced_mac_t pointer to the Wi-Fi MAC address

◆ host_platform_get_oob_interrupt_pin()

uint8_t host_platform_get_oob_interrupt_pin ( void )
extern

Get OOB interrupt pin (WLAN GPIO0 or GPIO1)

◆ host_platform_init()

wwd_result_t host_platform_init ( void )
extern

Initialises platform for WICED

Sets up parts of the hardware platform which are not directly part of the bus. These may include: Reset Pin and Regulator-On Pin.

Returns
WWD_SUCCESS or Error code

◆ host_platform_is_in_interrupt_context()

wiced_bool_t host_platform_is_in_interrupt_context ( void )
extern

Returns TRUE if the CPU is currently running in interrupt context

◆ host_platform_power_wifi()

void host_platform_power_wifi ( wiced_bool_t power_enabled)
extern

Switches the Power signal to the Broadcom Wi-Fi

WICED uses this function to switch the power signal to the Broadcom Wi-Fi chip. It should toggle the appropriate GPIO pins.

Parameters
power_enabled: WICED_TRUE = power up WICED_FALSE = power down

◆ host_platform_reset_wifi()

void host_platform_reset_wifi ( wiced_bool_t reset_asserted)
extern

Switches the Reset signal to the Broadcom Wi-Fi

WICED uses this function to switch the reset signal to the Broadcom Wi-Fi chip. It should toggle the appropriate GPIO pins.

Parameters
reset_assertedWICED_TRUE = reset asserted WICED_FALSE = reset de-asserted

◆ host_platform_sdio_enumerate()

wwd_result_t host_platform_sdio_enumerate ( void )
extern

Performs SDIO enumeration

This needs to be called if the WLAN chip is reset

◆ host_platform_sdio_transfer()

wwd_result_t host_platform_sdio_transfer ( wwd_bus_transfer_direction_t direction,
sdio_command_t command,
sdio_transfer_mode_t mode,
sdio_block_size_t block_size,
uint32_t argument,
uint32_t * data,
uint16_t data_size,
sdio_response_needed_t response_expected,
uint32_t * response )
extern

Transfers SDIO data

Implemented in the WICED Platform interface, which is specific to the platform in use. WICED uses this function as a generic way to transfer data across an SDIO bus. Please refer to the SDIO specification.

Parameters
direction: Direction of transfer - Write = to Wi-Fi device, Read = from Wi-Fi device
command: The SDIO command number
mode: Indicates whether transfer will be byte mode or block mode
block_size: The block size to use (if using block mode transfer)
argument: The argument of the particular SDIO command
data: A pointer to the data buffer used to transmit or receive
data_size: The length of the data buffer
response_expected: Indicates if a response is expected - RESPONSE_NEEDED = Yes NO_RESPONSE = No
response: A pointer to a variable which will receive the SDIO response. Can be null if the caller does not care about the response value.
Returns
WWD_SUCCESS if successful, otherwise an error code

◆ host_platform_unmask_sdio_interrupt()

wwd_result_t host_platform_unmask_sdio_interrupt ( void )
extern

Unmasks the bus interrupt

This function is called by WICED to unmask the bus interrupt on host platforms that must mask off the bus interrupt to allow processing of the existing interrupt.

◆ sdio_irq()

void sdio_irq ( void )
extern

SDIO interrupt handler

This function is implemented by Wiced and must be called from the interrupt vector

◆ wwd_thread_notify_irq()

void wwd_thread_notify_irq ( void )
extern

Informs WWD of an interrupt

This function should be called from the SDIO/SPI interrupt function and usually indicates newly received data is available. It wakes the WWD Thread, forcing it to check the send/receive