Skip to content

File ns_button.c

FileList > neuralSPOT > neuralspot > ns-peripherals > src > ns_button.c

Go to the source code of this file

  • #include "am_bsp.h"
  • #include "am_mcu_apollo.h"
  • #include "am_util.h"
  • #include "ns_core.h"
  • #include "ns_peripherals_button.h"

Public Attributes

Type Name
int volatile * g_ns_peripheral_button0
int volatile * g_ns_peripheral_button1
int volatile * g_ns_peripheral_joulescope_trigger
const ns_core_api_t ns_button_V0_0_1 = = {.apiId = NS_BUTTON_API_ID, .version = NS_BUTTON_V0_0_1}
const ns_core_api_t ns_button_V1_0_0 = = {.apiId = NS_BUTTON_API_ID, .version = NS_BUTTON_V1_0_0}
const ns_core_api_t ns_button_current_version = = {
.apiId = NS_BUTTON_API_ID, .version = NS_BUTTON_V1_0_0}
const ns_core_api_t ns_button_oldest_supported_version = = {
.apiId = NS_BUTTON_API_ID, .version = NS_BUTTON_V0_0_1}

Public Functions

Type Name
void ns_button_0_handler (void * pArg)
void ns_button_1_handler (void * pArg)
uint32_t ns_button_platform_init (ns_button_config_t * cfg)
void ns_joulescope_trigger_handler (void * pArg)
uint32_t ns_peripheral_button_init (ns_button_config_t * cfg)
Initialize button monitoring per the configuration struct.

Public Attributes Documentation

variable g_ns_peripheral_button0

int volatile* g_ns_peripheral_button0;

variable g_ns_peripheral_button1

int volatile* g_ns_peripheral_button1;

variable g_ns_peripheral_joulescope_trigger

int volatile* g_ns_peripheral_joulescope_trigger;

variable ns_button_V0_0_1

const ns_core_api_t ns_button_V0_0_1;

variable ns_button_V1_0_0

const ns_core_api_t ns_button_V1_0_0;

variable ns_button_current_version

const ns_core_api_t ns_button_current_version;

variable ns_button_oldest_supported_version

const ns_core_api_t ns_button_oldest_supported_version;

Public Functions Documentation

function ns_button_0_handler

void ns_button_0_handler (
    void * pArg
) 

function ns_button_1_handler

void ns_button_1_handler (
    void * pArg
) 

function ns_button_platform_init

uint32_t ns_button_platform_init (
    ns_button_config_t * cfg
) 

function ns_joulescope_trigger_handler

void ns_joulescope_trigger_handler (
    void * pArg
) 

function ns_peripheral_button_init

Initialize button monitoring per the configuration struct.

uint32_t ns_peripheral_button_init (
    ns_button_config_t * cfg
) 

Parameters:

  • ns_button_config_t* : button configuration struct

Returns:

uint32_t


The documentation for this class was generated from the following file neuralSPOT/neuralspot/ns-peripherals/src/ns_button.c