uwb4  2.1.0.0
Macros | Enumerations | Functions
main.c File Reference

UWB 4 Click Example. More...

#include "board.h"
#include "log.h"
#include "uwb4.h"
#include "generic_pointer.h"

Macros

#define EXAMPLE_INITIATOR
 
#define UWB_SESSION_ID   "1234"
 
#define UWB_ROLE   "0"
 
#define UWB_LOCAL_ADDRESS   "1111"
 
#define UWB_REMOTE_ADDRESS   "2222"
 
#define UWB_RANGING_INTERVAL   "500"
 
#define APP_BUFFER_SIZE   256
 
#define PROCESS_BUFFER_SIZE   256
 
#define READ_RESPONSE_TIMEOUT_MS   30000
 

Enumerations

enum  uwb4_app_state_t { UWB4_POWER_UP = 1, UWB4_CONFIG_EXAMPLE, UWB4_EXAMPLE }
 Example states. More...
 

Functions

void application_init (void)
 
void application_task (void)
 
int main (void)
 

Detailed Description

UWB 4 Click Example.

Description

This example demonstrates the use of UWB 4 click board by showing the UWB ranging between two click boards configured as initiator and responder.

The demo application is composed of two sections :

Application Init

Initializes the driver and logger.

Application Task

Application task is split in few stages:

Additional Function

Author
Stefan Filipovic

Macro Definition Documentation

◆ APP_BUFFER_SIZE

#define APP_BUFFER_SIZE   256

◆ EXAMPLE_INITIATOR

#define EXAMPLE_INITIATOR

◆ PROCESS_BUFFER_SIZE

#define PROCESS_BUFFER_SIZE   256

◆ READ_RESPONSE_TIMEOUT_MS

#define READ_RESPONSE_TIMEOUT_MS   30000

◆ UWB_LOCAL_ADDRESS

#define UWB_LOCAL_ADDRESS   "1111"

◆ UWB_RANGING_INTERVAL

#define UWB_RANGING_INTERVAL   "500"

◆ UWB_REMOTE_ADDRESS

#define UWB_REMOTE_ADDRESS   "2222"

◆ UWB_ROLE

#define UWB_ROLE   "0"

◆ UWB_SESSION_ID

#define UWB_SESSION_ID   "1234"

Enumeration Type Documentation

◆ uwb4_app_state_t

Example states.

Predefined enum values for application example state.

Enumerator
UWB4_POWER_UP 
UWB4_CONFIG_EXAMPLE 
UWB4_EXAMPLE 

Function Documentation

◆ application_init()

void application_init ( void  )

< Logger config object.

< Click config object.

Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG

Note
If USB_UART_RX and USB_UART_TX are defined as HAL_PIN_NC, you will need to define them manually for log to work. See LOG_MAP_USB_UART macro definition for detailed explanation.

◆ application_task()

void application_task ( void  )

◆ main()

int main ( void  )