Skip to content

File ns_ble.c

FileList > neuralspot > neuralspot > ns-ble > src > ns_ble.c

Go to the source code of this file

Generic BLE Wrapper. More...

  • #include "ns_ble.h"

Public Attributes

Type Name
FALSE
ns_ble_control_t g_ns_ble_control

Public Static Attributes

Type Name
dmConnId_t currentConnId = 0
appAdvCfg_t ns_ble_default_AdvCfg = /* multi line expression */
appSlaveCfg_t ns_ble_default_SlaveCfg = /* multi line expression */
smpCfg_t ns_ble_default_SmpCfg = /* multi line expression */
appUpdateCfg_t ns_ble_default_UpdateCfg = /* multi line expression */
const uint8_t ns_ble_generic_data_disc
const uint8_t ns_ble_generic_scan_data_disc

Public Functions

Type Name
void am_cooper_irq_isr (void)
void am_uart_isr (void)
void ns_ble_generic_handler (wsfEventMask_t event, wsfMsgHdr_t * pMsg)
void ns_ble_generic_handlerInit (wsfHandlerId_t handlerId, ns_ble_service_control_t * cfg)
void ns_ble_generic_init (bool useDefault, ns_ble_control_t * generic_cfg, ns_ble_service_control_t * service_cfg)
uint8_t ns_ble_generic_read_cback (dmConnId_t connId, uint16_t handle, uint8_t operation, uint16_t offset, attsAttr_t * pAttr)
uint8_t ns_ble_generic_write_cback (dmConnId_t connId, uint16_t handle, uint8_t operation, uint16_t offset, uint16_t len, uint8_t * pValue, attsAttr_t * pAttr)
uint16_t ns_ble_get_next_handle_id (ns_ble_service_t * service)
void ns_ble_new_handler (wsfEventMask_t event, wsfMsgHdr_t * pMsg)
void ns_ble_new_handler_init (wsfHandlerId_t handlerId)
bool ns_ble_new_proc_msg (ns_ble_msg_t * pMsg)

Public Static Functions

Type Name
void ns_ble_generic_AttCback (attEvt_t * pEvt)
void ns_ble_generic_CccCback (attsCccEvt_t * pEvt)
void ns_ble_generic_DmCback (dmEvt_t * pDmEvt)
void ns_ble_generic_advSetup (ns_ble_msg_t * pMsg)
void ns_ble_generic_conn_open (dmEvt_t * pMsg)
void ns_ble_generic_conn_update (dmEvt_t * pMsg)
void ns_ble_generic_new_handle_cnf (attEvt_t * pMsg)
void ns_ble_generic_procMsg (ns_ble_msg_t * pMsg)
bool ns_ble_handle_indication_timer_expired (ns_ble_msg_t * pMsg)
void ns_ble_process_ccc_state (attsCccEvt_t * pMsg)

Detailed Description

Author:

Ambiq Team

Version:

0.1

Date:

2023-06-08

Copyright:

Copyright (c) 2023

Public Attributes Documentation

variable FALSE

FALSE;

variable g_ns_ble_control

ns_ble_control_t g_ns_ble_control;

Public Static Attributes Documentation

variable currentConnId

dmConnId_t currentConnId;

variable ns_ble_default_AdvCfg

appAdvCfg_t ns_ble_default_AdvCfg;

configurable parameters for advertising


variable ns_ble_default_SlaveCfg

appSlaveCfg_t ns_ble_default_SlaveCfg;

configurable parameters for slave


variable ns_ble_default_SmpCfg

smpCfg_t ns_ble_default_SmpCfg;

SMP security parameter configuration


variable ns_ble_default_UpdateCfg

appUpdateCfg_t ns_ble_default_UpdateCfg;

configurable parameters for connection parameter update


variable ns_ble_generic_data_disc

const uint8_t ns_ble_generic_data_disc[];

advertising data, discoverable mode


variable ns_ble_generic_scan_data_disc

const uint8_t ns_ble_generic_scan_data_disc[];

scan data, discoverable mode


Public Functions Documentation

function am_cooper_irq_isr

void am_cooper_irq_isr (
    void
) 

function am_uart_isr

void am_uart_isr (
    void
) 

function ns_ble_generic_handler

void ns_ble_generic_handler (
    wsfEventMask_t event,
    wsfMsgHdr_t * pMsg
) 

function ns_ble_generic_handlerInit

void ns_ble_generic_handlerInit (
    wsfHandlerId_t handlerId,
    ns_ble_service_control_t * cfg
) 

function ns_ble_generic_init

void ns_ble_generic_init (
    bool useDefault,
    ns_ble_control_t * generic_cfg,
    ns_ble_service_control_t * service_cfg
) 

function ns_ble_generic_read_cback

uint8_t ns_ble_generic_read_cback (
    dmConnId_t connId,
    uint16_t handle,
    uint8_t operation,
    uint16_t offset,
    attsAttr_t * pAttr
) 

function ns_ble_generic_write_cback

uint8_t ns_ble_generic_write_cback (
    dmConnId_t connId,
    uint16_t handle,
    uint8_t operation,
    uint16_t offset,
    uint16_t len,
    uint8_t * pValue,
    attsAttr_t * pAttr
) 

function ns_ble_get_next_handle_id

uint16_t ns_ble_get_next_handle_id (
    ns_ble_service_t * service
) 

function ns_ble_new_handler

void ns_ble_new_handler (
    wsfEventMask_t event,
    wsfMsgHdr_t * pMsg
) 

function ns_ble_new_handler_init

void ns_ble_new_handler_init (
    wsfHandlerId_t handlerId
) 

function ns_ble_new_proc_msg

bool ns_ble_new_proc_msg (
    ns_ble_msg_t * pMsg
) 

Public Static Functions Documentation

function ns_ble_generic_AttCback

static void ns_ble_generic_AttCback (
    attEvt_t * pEvt
) 

function ns_ble_generic_CccCback

static void ns_ble_generic_CccCback (
    attsCccEvt_t * pEvt
) 

function ns_ble_generic_DmCback

static void ns_ble_generic_DmCback (
    dmEvt_t * pDmEvt
) 

function ns_ble_generic_advSetup

static void ns_ble_generic_advSetup (
    ns_ble_msg_t * pMsg
) 

function ns_ble_generic_conn_open

static void ns_ble_generic_conn_open (
    dmEvt_t * pMsg
) 

function ns_ble_generic_conn_update

static void ns_ble_generic_conn_update (
    dmEvt_t * pMsg
) 

function ns_ble_generic_new_handle_cnf

static void ns_ble_generic_new_handle_cnf (
    attEvt_t * pMsg
) 

function ns_ble_generic_procMsg

static void ns_ble_generic_procMsg (
    ns_ble_msg_t * pMsg
) 

function ns_ble_handle_indication_timer_expired

static bool ns_ble_handle_indication_timer_expired (
    ns_ble_msg_t * pMsg
) 

function ns_ble_process_ccc_state

static void ns_ble_process_ccc_state (
    attsCccEvt_t * pMsg
) 


The documentation for this class was generated from the following file neuralspot/neuralspot/ns-ble/src/ns_ble.c