File ns_core.c
FileList > neuralSPOT > neuralspot > ns-core > src > ns_core.c
Go to the source code of this file
Code common to all neuralSPOT. More...
#include "ns_core.h"
Public Attributes
Type | Name |
---|---|
ns_desired_state_t | g_ns_state Collection of ns-wide states and desired states. |
const ns_core_api_t | ns_core_V0_0_1 |
const ns_core_api_t | ns_core_V1_0_0 |
const ns_core_api_t | ns_core_current_version |
const ns_core_api_t | ns_core_oldest_supported_version |
Public Functions
Type | Name |
---|---|
uint32_t | ns_core_check_api (const ns_core_api_t * submitted, const ns_core_api_t * oldest, const ns_core_api_t * newest) |
void | ns_core_fail_loop () |
uint32_t | ns_core_init (ns_core_config_t * c) Initialize core state. |
Public Static Functions
Type | Name |
---|---|
int | semver_compare (const ns_semver_t * c, const ns_semver_t * n) |
Macros
Type | Name |
---|---|
define | NS_CORE_API_ID 0xCA0000 |
Detailed Description
Author:
Carlos Morales
Version:
0.1
Date:
2022-11-03
Copyright:
Copyright (c) 2022
Public Attributes Documentation
variable g_ns_state
ns_desired_state_t g_ns_state;
variable ns_core_V0_0_1
const ns_core_api_t ns_core_V0_0_1;
variable ns_core_V1_0_0
const ns_core_api_t ns_core_V1_0_0;
variable ns_core_current_version
const ns_core_api_t ns_core_current_version;
variable ns_core_oldest_supported_version
const ns_core_api_t ns_core_oldest_supported_version;
Public Functions Documentation
function ns_core_check_api
uint32_t ns_core_check_api (
const ns_core_api_t * submitted,
const ns_core_api_t * oldest,
const ns_core_api_t * newest
)
brief Checks API and semantic version of desired API vs. allowed APIs
param submitted param oldest param newest return uint32_t
function ns_core_fail_loop
void ns_core_fail_loop ()
function ns_core_init
Initialize core state.
uint32_t ns_core_init (
ns_core_config_t * c
)
Parameters:
c
ns_core_config_t indicating the API version
Returns:
uint32_t
Public Static Functions Documentation
function semver_compare
static int semver_compare (
const ns_semver_t * c,
const ns_semver_t * n
)
Compare semantic versions
param c - 'current' version param n - 'target' version return int - 0 if equal, -1 is c is less than n, 1 if c is more than n
Macro Definition Documentation
define NS_CORE_API_ID
#define NS_CORE_API_ID 0xCA0000
The documentation for this class was generated from the following file neuralSPOT/neuralspot/ns-core/src/ns_core.c