ble12 2.0.0.0
main.c File Reference

BLE 12 Click Example. More...

#include "board.h"
#include "log.h"
#include "ble12.h"

Macros

#define PROCESS_BUFFER_SIZE   200
 
#define RSP_TIMEOUT   100
 

Functions

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

Detailed Description

BLE 12 Click Example.

Description

This example reads and processes data from BLE 12 Click boardâ„¢.

The demo application is composed of two sections :

Application Init

Initializes UART driver and logs UART. After driver initialization, the app performs a wake-up module, enters command mode, sets the device name and advertising time interval, and disconnects all connections. After that, the blinking of the yellow LED Indicates that the BLE 12 Click boardâ„¢ is ready for connection. After establishing the connection, the yellow LED is turned on.

Application Task

This example demonstrates the use of the BLE 12 Click boardâ„¢. Reads the received data and parses it. Results are being sent to the Usart Terminal, where you can track their changes.

Additional Function

  • static void ble12_clear_app_buf ( void )
  • static err_t ble12_process ( void )
Note
We have used the Serial Bluetooth Terminal Android application for the test and you can find it at the link: https://play.google.com/store/apps/details?id=de.kai_morich.serial_bluetooth_terminal
Author
Nenad Filipovic

Macro Definition Documentation

◆ PROCESS_BUFFER_SIZE

#define PROCESS_BUFFER_SIZE   200

◆ RSP_TIMEOUT

#define RSP_TIMEOUT   100

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 )