Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Anchor11507541150754 NetDev_WiFi_SPI_WrRd() Anchor11443891144389This function is called by a device driver each time some data must be written &/or read from the wireless device/interface. Anchor11443901144390

Files

...

11443911144391net_bsp.c Anchor11443921144392

Prototype

...

static CPU_INT32U CPU_INT08U

                                                  CPU_INT08U *p_buf_wr,
CPU_INT08U

                                                  CPU_INT08U *p_buf_rd,
CPU_INT16U wr_rd_len, NET_ERR

                                                  CPU_INT16U  wr_rd_len,
                                                  NET_ERR    *p_err);
HTML Table
summary
classCode_Listing
Table Row (tr)
Table Cell (td)
rowspan2
Anchor
11443951144395
Code Block

          static CPU_INT32U NetDev_WiFi_SPI_WrRd (NET_IF     *p_if,
Anchor
11515861151586
Anchor
11445551144555
Anchor
11445781144578
Anchor
11446011144601
Table Row (tr)

...

11444001144400Note that since NetDev_WiFi_SPI_UnlockWrRd() is accessed only by function pointer via a BSP interface structure, it doesn’t need to be globally available and should therefore be declared as ‘static’. Anchor11444011144401static’.

Arguments

...

11447101144710p_if Anchor11447111144711

Pointer to specific interface to write and read data to SPI bus.

...

p_buf_wranchor11447561144756

Pointer to a buffer that contains the data to write.

...

1144781p_buf_rd Anchor11447761144776

Pointer to a buffer that will receive the data read.

Anchor11447971144797wr_rd_len Anchor11447921144792

Number of octet to write and read.

...

p_erranchor11444051144405

Pointer to variable that will receive the return error code from this function:

...

...

NET_DEV_ERR_NONE

...


NET_DEV_ERR_FAULT

...


11444071144407This is not an exclusive list of return errors and specific network device’s or device BSP functions may return any other specific errors as required. Anchor11444081144408

Returned Value

Anchor11444091144409None.anchor11444101144410

Required Configuration

Anchor11444111144411None. Anchor11444121144412

Notes / Warnings

...

...

  • NetDev_WiFi_SPI_ChipSelEn() should be called only after the SPI lock has been acquired by calling NetDev_WiFi_SPI_Lock().

...

  • Since each network device requires a unique NetDev_WiFi_SPI_WrRd(), it is recommended that each device’s NetDev_WiFi_SPI_WrRd() function be named using the following convention:

...

  • NetDev_WiFi_[Device]SPI_WrRd[Number]()

...


...

  • [Device]

...

  • Network device name or type, e.g. RS9110 (optional if the development board does not support multiple devices)

Anchor11444181144418[Number]anchor11444191144419

Network device number for each specific instance of device (optional if the development board does not support multiple instances of the specific device)

...

For example, the NetDev_WiFi_SPI_WrRd() function for the #2 RS9110 wireless device on an Atmel AT91SAM9263-EK should be named NetDev_WiFi_RS9110_SPI_WrRd2(), or NetDev_WiFi_RS9110_SPI_WrRd_2() with additional underscore optional.

...

See also

...

section Network Board Support

...

Package.