Enables WICED to use the hardware platform.
◆ host_enable_oob_interrupt()
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()
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()
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()
Enables the bus interrupt
This function is called by WICED during init, once the system is ready to receive interrupts
◆ host_platform_bus_init()
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()
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()
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()
Returns Ethernet MAC address
- Parameters
-
◆ host_platform_get_mac_address()
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
-
◆ 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()
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()
Returns TRUE if the CPU is currently running in interrupt context
◆ host_platform_power_wifi()
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_asserted | WICED_TRUE = reset asserted WICED_FALSE = reset de-asserted |
◆ host_platform_sdio_enumerate()
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()
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()
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