2.4. bcm43362
— BCM43362¶
BCM43362 is a WiFi module by Boadcom.
Homepage: https://www.broadcom.com/products/wireless-connectivity/wireless-lan/bcm43362
Source code: src/drivers/bcm43362.h, src/drivers/bcm43362.c
Test code: tst/drivers/bcm43362/main.c
Functions
-
int
bcm43362_module_init
(void)¶ Initialize the BCM43362 module. This function must be called before calling any other function in this module.
The module will only be initialized once even if this function is called multiple times.
- Return
- zero(0) or negative error code.
-
int
bcm43362_init
(struct bcm43362_driver_t *self_p, struct sdio_device_t *sdio_dev_p)¶ Initialize driver object from given configuration.
- Return
- zero(0) or negative error code.
- Parameters
self_p
: Driver object to be initialized.sdio_dev_p
: SDIO device to use.
-
int
bcm43362_start
(struct bcm43362_driver_t *self_p)¶ Starts the BCM43362 device using given driver object.
After a successful start of the device the application may call
bcm43362_connect()
to connect to an AP.- Return
- zero(0) or negative error code.
- Parameters
self_p
: Initialized driver object.
-
int
bcm43362_stop
(struct bcm43362_driver_t *self_p)¶ Stops the BCM43362 device referenced by given driver object.
- Return
- zero(0) or negative error code.
- Parameters
self_p
: Initialized driver object.
-
int
bcm43362_connect
(struct bcm43362_driver_t *self_p, const char *ssid_p, const char *password_p)¶ Connect to an WiFi Access Point (AP) with given SSID and password.
- Return
- zero(0) or negative error code.
- Parameters
self_p
: Initialized driver object.ssid_p
: SSID of the WiFi AP to connect to.password_p
: Password.
-
int
bcm43362_disconnect
(struct bcm43362_driver_t *self_p)¶ Disconnect from any connected WiFi AP.
- Return
- zero(0) or negative error code.
- Parameters
self_p
: Initialized driver object.
-
ssize_t
bcm43362_read
(struct bcm43362_driver_t *self_p, struct pbuf *pbuf_p, size_t size)¶ Read a packet from the BCM43362 device.
- Return
- Number of read bytes or negative error code.
- Parameters
self_p
: Initialized driver object.pbuf_p
: Buffer to read into.size
: Number of bytes to receive.
-
ssize_t
bcm43362_write
(struct bcm43362_driver_t *self_p, struct pbuf *pbuf_p, size_t size)¶ Write given packet to the BCM43362 device to transmit it on the network.
This function is normally called by a network interface to send a frame on the network.
- Return
- Number of written bytes or negative error code.
- Parameters
self_p
: Initialized driver object.pbuf_p
: Buffer to write.size
: Number of bytes to write.
- struct
- #include <bcm43362.h>
Public Members
-
struct sdio_driver_t
bcm43362_driver_t::
sdio
¶
-
struct sdio_driver_t