mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2025-04-21 12:27:27 +03:00
libatrf: added HardMAC functions
This function set isn't really usable for real communication. Its main purpose is to help with testing the firmware. - tools/lib/driver.h (struct atrf_driver): added driver functions for HardMAC access - tools/include/atrf.h (atrf_rx_mode, atrf_rx, atrf_tx), tools/lib/atrf.c: functions to enable/disable HardMAC mode and to send/receive frames
This commit is contained in:
@@ -322,3 +322,25 @@ int atrf_interrupt_wait(struct atrf_dsc *dsc, int timeout_ms)
|
||||
{
|
||||
return dsc->driver->interrupt_wait(dsc->handle, timeout_ms);
|
||||
}
|
||||
|
||||
|
||||
void atrf_rx_mode(struct atrf_dsc *dsc, int on)
|
||||
{
|
||||
if (dsc->driver->rx_mode)
|
||||
dsc->driver->rx_mode(dsc->handle, on);
|
||||
}
|
||||
|
||||
|
||||
int atrf_rx(struct atrf_dsc *dsc, void *buf, int size, uint8_t *lqi)
|
||||
{
|
||||
if (!dsc->driver->rx)
|
||||
return 0;
|
||||
return dsc->driver->rx(dsc->handle, buf, size, lqi);
|
||||
}
|
||||
|
||||
|
||||
void atrf_tx(struct atrf_dsc *dsc, const void *buf, int size)
|
||||
{
|
||||
if (dsc->driver->tx)
|
||||
dsc->driver->tx(dsc->handle, buf, size);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user