Loading...
Searching...
No Matches
atwinc15x0_internal.h File Reference

Internal definitions for the ATWINC15x0 WiFi netdev driver. More...

Detailed Description

Internal definitions for the ATWINC15x0 WiFi netdev driver.

Author
Gunar Schorcht gunar.nosp@m.@sch.nosp@m.orcht.nosp@m..net

Definition in file atwinc15x0_internal.h.

#include <stdbool.h>
#include <string.h>
#include "driver/include/m2m_types.h"
#include "atwinc15x0.h"
+ Include dependency graph for atwinc15x0_internal.h:

Go to the source code of this file.

#define ATWINC1510_SCAN_SLOTS_MIN   2
 Minimum number of slots to scan a channel.
 
#define ATWINC1510_SCAN_SLOTS_DEF   M2M_SCAN_DEFAULT_NUM_SLOTS
 Default number of slots to scan a channel.
 
#define ATWINC1510_SCAN_SLOTS_MAX   255
 Maximum number of slots to scan a channel.
 
#define ATWINC1510_SCAN_SLOT_TIME_MS_MIN   10
 Time in ms to scan a slot in a channel.
 
#define ATWINC1510_SCAN_SLOT_TIME_MS_DEF   M2M_SCAN_DEFAULT_SLOT_TIME
 Default time in ms to scan a slot in a channel.
 
#define ATWINC1510_SCAN_SLOT_TIME_MS_MAX   250
 Maximum time in ms to scan a slot in a channel.
 
#define ATWINC1510_SCAN_PROBES_NUMOF_DEF   M2M_SCAN_DEFAULT_NUM_PROBE
 Default number of probes to send to scan a channel.
 
#define ATWINC1510_SCAN_THRESHOLD_DBM_DEF   (-99)
 Default threshold in dbm for an AP to pass.
 
atwinc15x0_tatwinc15x0
 Reference to the single ATWINC15x0 device instance.
 
static bool _atwinc15x0_is_scanning (const atwinc15x0_t *dev)
 Check if dev is scanning.
 
static void _atwinc15x0_set_scanning (atwinc15x0_t *dev)
 Set state to indicate that dev is scanning.
 
static bool _atwinc15x0_is_connecting (const atwinc15x0_t *dev)
 Check if dev is connecting to an AP.
 
static void _atwinc15x0_set_connecting (atwinc15x0_t *dev)
 Set state to indicate that dev is connecting to an AP.
 
static bool _atwinc15x0_is_disconnecting (const atwinc15x0_t *dev)
 Check if dev is disconnecting from an AP.
 
static void _atwinc15x0_set_disconnecting (atwinc15x0_t *dev)
 Set state to indicate that dev is disconnecting from an AP.
 
static bool _atwinc15x0_is_connected (const atwinc15x0_t *dev)
 Check if dev is connected to an AP.
 
static void _atwinc15x0_set_connected (atwinc15x0_t *dev)
 Set state to indicate that dev is connected to an AP.
 
static void _atwinc15x0_set_disconnected (atwinc15x0_t *dev)
 Set state to indicate that dev is disconnected.
 
static bool _atwinc15x0_is_busy (const atwinc15x0_t *dev)
 Check if dev is currently performing an asynchronous operation.
 
static bool _atwinc15x0_is_idle (const atwinc15x0_t *dev)
 Check is dev is currently not performing an asynchronous operation.
 
static void _atwinc15x0_set_idle (atwinc15x0_t *dev)
 Return from any busy state to corresponding idle state.
 
static void _atwinc15x0_set_sleeping (atwinc15x0_t *dev)
 Set state to indicate that dev is sleeping.
 
static bool _atwinc15x0_is_sleeping (const atwinc15x0_t *dev)
 Check if dev is currently sleeping.
 
static void _atwinc15x0_sta_set_current_ssid (atwinc15x0_t *dev, const char *ssid)
 Set member of currently connected AP SSID.
 
static const char * _atwinc15x0_sta_get_current_ssid (const atwinc15x0_t *dev)
 Get member of currently connected AP.
 
void atwinc15x0_irq (void)
 ATWINC15x0 device driver ISR.
 

Macro Definition Documentation

◆ ATWINC1510_SCAN_PROBES_NUMOF_DEF

#define ATWINC1510_SCAN_PROBES_NUMOF_DEF   M2M_SCAN_DEFAULT_NUM_PROBE

Default number of probes to send to scan a channel.

Definition at line 74 of file atwinc15x0_internal.h.

◆ ATWINC1510_SCAN_SLOT_TIME_MS_DEF

#define ATWINC1510_SCAN_SLOT_TIME_MS_DEF   M2M_SCAN_DEFAULT_SLOT_TIME

Default time in ms to scan a slot in a channel.

Definition at line 64 of file atwinc15x0_internal.h.

◆ ATWINC1510_SCAN_SLOT_TIME_MS_MAX

#define ATWINC1510_SCAN_SLOT_TIME_MS_MAX   250

Maximum time in ms to scan a slot in a channel.

Definition at line 69 of file atwinc15x0_internal.h.

◆ ATWINC1510_SCAN_SLOT_TIME_MS_MIN

#define ATWINC1510_SCAN_SLOT_TIME_MS_MIN   10

Time in ms to scan a slot in a channel.

Definition at line 59 of file atwinc15x0_internal.h.

◆ ATWINC1510_SCAN_SLOTS_DEF

#define ATWINC1510_SCAN_SLOTS_DEF   M2M_SCAN_DEFAULT_NUM_SLOTS

Default number of slots to scan a channel.

Definition at line 49 of file atwinc15x0_internal.h.

◆ ATWINC1510_SCAN_SLOTS_MAX

#define ATWINC1510_SCAN_SLOTS_MAX   255

Maximum number of slots to scan a channel.

Definition at line 54 of file atwinc15x0_internal.h.

◆ ATWINC1510_SCAN_SLOTS_MIN

#define ATWINC1510_SCAN_SLOTS_MIN   2

Minimum number of slots to scan a channel.

Definition at line 44 of file atwinc15x0_internal.h.

◆ ATWINC1510_SCAN_THRESHOLD_DBM_DEF

#define ATWINC1510_SCAN_THRESHOLD_DBM_DEF   (-99)

Default threshold in dbm for an AP to pass.

Definition at line 79 of file atwinc15x0_internal.h.

Function Documentation

◆ _atwinc15x0_is_busy()

static bool _atwinc15x0_is_busy ( const atwinc15x0_t dev)
inlinestatic

Check if dev is currently performing an asynchronous operation.

Parameters
[in]devATWINC15x0 device
Returns
true if dev is busy
false if dev is not busy

Definition at line 209 of file atwinc15x0_internal.h.

◆ _atwinc15x0_is_connected()

static bool _atwinc15x0_is_connected ( const atwinc15x0_t dev)
inlinestatic

Check if dev is connected to an AP.

Parameters
[in]devATWINC15x0 device
Returns
true if dev is connected
false if dev is not connected

Definition at line 174 of file atwinc15x0_internal.h.

◆ _atwinc15x0_is_connecting()

static bool _atwinc15x0_is_connecting ( const atwinc15x0_t dev)
inlinestatic

Check if dev is connecting to an AP.

Parameters
[in]devATWINC15x0 device
Returns
true if dev is connecting
false if dev is not connecting

Definition at line 119 of file atwinc15x0_internal.h.

◆ _atwinc15x0_is_disconnecting()

static bool _atwinc15x0_is_disconnecting ( const atwinc15x0_t dev)
inlinestatic

Check if dev is disconnecting from an AP.

Parameters
[in]devATWINC15x0 device
Returns
true if dev is disconnecting
false if dev is not disconnecting

Definition at line 150 of file atwinc15x0_internal.h.

◆ _atwinc15x0_is_idle()

static bool _atwinc15x0_is_idle ( const atwinc15x0_t dev)
inlinestatic

Check is dev is currently not performing an asynchronous operation.

Parameters
[in]devATWINC15x0 device
Returns
true if dev is idle
false if dev is not idle

Definition at line 225 of file atwinc15x0_internal.h.

◆ _atwinc15x0_is_scanning()

static bool _atwinc15x0_is_scanning ( const atwinc15x0_t dev)
inlinestatic

Check if dev is scanning.

Parameters
[in]devATWINC15x0 device
Returns
true if dev is scanning
false if dev is not scanning

Definition at line 89 of file atwinc15x0_internal.h.

◆ _atwinc15x0_is_sleeping()

static bool _atwinc15x0_is_sleeping ( const atwinc15x0_t dev)
inlinestatic

Check if dev is currently sleeping.

Parameters
[in]devATWINC15x0 device
Returns
true if dev is sleeping
false if dev is not sleeping

Definition at line 263 of file atwinc15x0_internal.h.

◆ _atwinc15x0_set_connected()

static void _atwinc15x0_set_connected ( atwinc15x0_t dev)
inlinestatic

Set state to indicate that dev is connected to an AP.

Parameters
[in,out]devATWINC15x0 device

Definition at line 186 of file atwinc15x0_internal.h.

◆ _atwinc15x0_set_connecting()

static void _atwinc15x0_set_connecting ( atwinc15x0_t dev)
inlinestatic

Set state to indicate that dev is connecting to an AP.

Parameters
[in,out]devATWINC15x0 device

Definition at line 130 of file atwinc15x0_internal.h.

◆ _atwinc15x0_set_disconnected()

static void _atwinc15x0_set_disconnected ( atwinc15x0_t dev)
inlinestatic

Set state to indicate that dev is disconnected.

Parameters
[in,out]devATWINC15x0 device

Definition at line 198 of file atwinc15x0_internal.h.

◆ _atwinc15x0_set_disconnecting()

static void _atwinc15x0_set_disconnecting ( atwinc15x0_t dev)
inlinestatic

Set state to indicate that dev is disconnecting from an AP.

Parameters
[in,out]devATWINC15x0 device

Definition at line 160 of file atwinc15x0_internal.h.

◆ _atwinc15x0_set_idle()

static void _atwinc15x0_set_idle ( atwinc15x0_t dev)
inlinestatic

Return from any busy state to corresponding idle state.

Parameters
[in]devATWINC15x0 device

Definition at line 235 of file atwinc15x0_internal.h.

◆ _atwinc15x0_set_scanning()

static void _atwinc15x0_set_scanning ( atwinc15x0_t dev)
inlinestatic

Set state to indicate that dev is scanning.

Parameters
[in,out]devATWINC15x0 device

Definition at line 99 of file atwinc15x0_internal.h.

◆ _atwinc15x0_set_sleeping()

static void _atwinc15x0_set_sleeping ( atwinc15x0_t dev)
inlinestatic

Set state to indicate that dev is sleeping.

Parameters
[in]devATWINC15x0 device

Definition at line 251 of file atwinc15x0_internal.h.

◆ _atwinc15x0_sta_get_current_ssid()

static const char * _atwinc15x0_sta_get_current_ssid ( const atwinc15x0_t dev)
inlinestatic

Get member of currently connected AP.

Precondition
Module atwinc15x0_dynamic_connect is used
Parameters
[in]devATWINC15x0 device
Returns
SSID member

Definition at line 291 of file atwinc15x0_internal.h.

◆ _atwinc15x0_sta_set_current_ssid()

static void _atwinc15x0_sta_set_current_ssid ( atwinc15x0_t dev,
const char *  ssid 
)
inlinestatic

Set member of currently connected AP SSID.

Precondition
Module atwinc15x0_dynamic_connect is used
Parameters
[in,out]devATWINC15x0 device
[in]ssidSSID

Definition at line 275 of file atwinc15x0_internal.h.

Variable Documentation

◆ atwinc15x0

Reference to the single ATWINC15x0 device instance.

Since the vendor ATWINC15x0 host driver uses many global variables, only a single ATWINC15x0 device can be used. Therefore, the RIOT driver only supports a single instance of an ATWINC15x0 device.