Microchip® Advanced Software Framework

thirdparty/wireless/ble_sdk/apps/l2cap_peripheral/main.c File Reference
#include <asf.h>
#include "platform.h"
#include "console_serial.h"
#include "timer_hw.h"
#include "ble_utils.h"
#include "at_ble_api.h"
#include "ble_manager.h"
#include "at_ble_trace.h"
#include "conf_extint.h"

Macros

#define APP_CID   0x40
 
#define APP_CREDIT   0x7FFF
 
#define APP_DATA_LEN   507
 
#define APP_PSM   0x80
 
#define APP_TIMER_EVENT_ID   (1)
 
#define TIMER_INTERVAL   (1)
 

Functions

static at_ble_status_t app_init (void)
 
static at_ble_lecb_status at_app_send_lecb (uint16_t credit, uint8_t *data)
 
at_ble_status_t ble_adv_report (void *params)
 
at_ble_status_t ble_l2cap_connected (void *params)
 
at_ble_status_t ble_l2cap_disconnected (void *params)
 
at_ble_status_t l2cap_connected (void *parma)
 
at_ble_status_t l2cap_credit_indication (void *params)
 
static at_ble_status_t l2cap_custom_event (void *param)
 
at_ble_status_t l2cap_data_recv (void *params)
 
at_ble_status_t l2cap_disconnect (void *params)
 
at_ble_status_t l2cap_send_resp (void *params)
 
int main (void)
 
static void timer_callback_handler (void)
 

Variables

user_custom_event_t app_timer_event
 
static const ble_l2cap_event_cb_t at_ble_mgr_l2cap_event_handle
 
static uint8_t au8AdvData []
 
static uint8_t au8ScanRspData []
 
static const ble_gap_event_cb_t ble_mgr_l2cap_gap_handle
 
uint8_t data [APP_DATA_LEN]
 
static uint16_t dest_credit = 0
 
at_ble_handle_t gstHandle = 0xFFFF
 
static uint32_t gu32NumOfSend = 0
 
static const ble_custom_event_cb_t l2cap_custom_event_cb
 
static uint8_t payloadCounter = 1
 
static uint32_t time_count =0
 
bool volatile timer_cb_done = false
 

#define APP_CID   0x40

Referenced by at_app_send_lecb().

#define APP_CREDIT   0x7FFF
#define APP_DATA_LEN   507

Referenced by at_app_send_lecb(), and main().

#define APP_PSM   0x80
#define APP_TIMER_EVENT_ID   (1)

Referenced by l2cap_custom_event().

#define TIMER_INTERVAL   (1)

Referenced by at_app_send_lecb().

at_ble_status_t ble_adv_report ( void *  params)

References AT_BLE_SUCCESS.

at_ble_status_t ble_l2cap_connected ( void *  params)
at_ble_status_t ble_l2cap_disconnected ( void *  params)
at_ble_status_t l2cap_connected ( void *  parma)
at_ble_status_t l2cap_credit_indication ( void *  params)
static at_ble_status_t l2cap_custom_event ( void *  param)
static
at_ble_status_t l2cap_data_recv ( void *  params)
at_ble_status_t l2cap_disconnect ( void *  params)
at_ble_status_t l2cap_send_resp ( void *  params)
static void timer_callback_handler ( void  )
static

user_custom_event_t app_timer_event
Initial value:
=
{
.bptr = NULL
}
#define APP_TIMER_EVENT_ID
Definition: thirdparty/wireless/ble_sdk/apps/l2cap_peripheral/main.c:87
#define NULL
Definition: def.h:47
const ble_l2cap_event_cb_t at_ble_mgr_l2cap_event_handle
static
Initial value:
= {
.lecb_connected = l2cap_connected,
.lecb_disconnected=l2cap_disconnect,
.lecb_send_resp=l2cap_send_resp,
.lecb_data_recieved=l2cap_data_recv,
.lecb_add_credit_ind=l2cap_credit_indication
}
at_ble_status_t l2cap_credit_indication(void *params)
Definition: thirdparty/wireless/ble_sdk/apps/l2cap_central/main.c:324
at_ble_status_t l2cap_data_recv(void *params)
Definition: thirdparty/wireless/ble_sdk/apps/l2cap_central/main.c:304
at_ble_status_t l2cap_connected(void *parma)
Definition: thirdparty/wireless/ble_sdk/apps/l2cap_central/main.c:285
at_ble_status_t l2cap_disconnect(void *params)
Definition: thirdparty/wireless/ble_sdk/apps/l2cap_central/main.c:343
at_ble_status_t l2cap_send_resp(void *params)
Definition: thirdparty/wireless/ble_sdk/apps/l2cap_central/main.c:297
uint8_t au8AdvData[]
static
Initial value:
= { 0x1a, 0xff, 0x4c, 0x00, 0x02, 0x15, 0x21, 0x8A,
0xF6, 0x52, 0x73, 0xE3, 0x40, 0xB3, 0xB4, 0x1C,
0x19, 0x53, 0x24, 0x2C, 0x72, 0xf4, 0x00, 0xbb,
0x00, 0x44, 0xc5
}

Referenced by app_init().

uint8_t au8ScanRspData[]
static
Initial value:
= { 0x11, 0x07, 0x1b, 0xc5, 0xd5, 0xa5, 0x02, 0x00,
0x37, 0xaa, 0xe3, 0x11, 0x2a, 0xdc, 0x00, 0xcd,
0x30, 0x57
}

Referenced by app_init().

const ble_gap_event_cb_t ble_mgr_l2cap_gap_handle
static
Initial value:
= {
.adv_report = ble_adv_report,
.connected =ble_l2cap_connected,
.disconnected=ble_l2cap_disconnected
}
at_ble_status_t ble_adv_report(void *params)
Definition: thirdparty/wireless/ble_sdk/apps/l2cap_peripheral/main.c:240
at_ble_status_t ble_l2cap_disconnected(void *params)
Definition: thirdparty/wireless/ble_sdk/apps/l2cap_central/main.c:276
at_ble_status_t ble_l2cap_connected(void *params)
Definition: thirdparty/wireless/ble_sdk/apps/l2cap_central/main.c:257
uint8_t data[APP_DATA_LEN]
uint16_t dest_credit = 0
static

Referenced by at_app_send_lecb().

at_ble_handle_t gstHandle = 0xFFFF
uint32_t gu32NumOfSend = 0
static

Referenced by at_app_send_lecb(), and main().

const ble_custom_event_cb_t l2cap_custom_event_cb
static
Initial value:
= {
.custom_event = l2cap_custom_event
}
static at_ble_status_t l2cap_custom_event(void *param)
Definition: thirdparty/wireless/ble_sdk/apps/l2cap_peripheral/main.c:174
uint8_t payloadCounter = 1
static
uint32_t time_count =0
static

Referenced by l2cap_custom_event().

bool volatile timer_cb_done = false