Developer World
Spresense SDK Library release-v1.2.0-627f51e
Classes | Macros | Functions
Step Counter API

Classes

class  StepCounterClass
 

Macros

#define STEP_COUNTER_INITIAL_WALK_STEP_LENGTH   60 /* [cm] */
 
#define STEP_COUNTER_INITIAL_RUN_STEP_LENGTH   80 /* [cm] */
 

Functions

StepCounterClassStepCounterCreate (MemMgrLite::PoolId cmd_pool_id)
 Create StepCounterClass instance. More...
 
int StepCounterOpen (FAR StepCounterClass *ins)
 Load StepCounter library and boot up as worker task. After booted up, send initialize and wait complete. More...
 
int StepCounterClose (FAR StepCounterClass *ins)
 Destory StepCounter worker task. More...
 
int StepCounterWrite (FAR StepCounterClass *ins, FAR sensor_command_data_mh_t *command)
 Send data to StepCounter worker task. More...
 
int StepCounterSet (FAR StepCounterClass *ins, FAR StepCounterSetting *set)
 User step set function. More...
 

Detailed Description

Function Documentation

◆ StepCounterClose()

int StepCounterClose ( FAR StepCounterClass ins)

Destory StepCounter worker task.

Parameters
[in]ins: instance address of StepCounterClass
Returns
result of process.

◆ StepCounterCreate()

StepCounterClass* StepCounterCreate ( MemMgrLite::PoolId  cmd_pool_id)

Create StepCounterClass instance.

Parameters
[in]cmd_pool_id: Pool id for DSP communication data
Returns
Address for instance of StepCounterClass

◆ StepCounterOpen()

int StepCounterOpen ( FAR StepCounterClass ins)

Load StepCounter library and boot up as worker task. After booted up, send initialize and wait complete.

Parameters
[in]ins: instance address of StepCounterClass
Returns
result of process.

◆ StepCounterSet()

int StepCounterSet ( FAR StepCounterClass ins,
FAR StepCounterSetting set 
)

User step set function.

Parameters
[in]ins: instance address of StepCounterClass
[in]set: user step set pointer
Returns
result of process

◆ StepCounterWrite()

int StepCounterWrite ( FAR StepCounterClass ins,
FAR sensor_command_data_mh_t *  command 
)

Send data to StepCounter worker task.

Parameters
[in]ins: instance address of StepCounterClass
[in]command: command including data to send
Returns
result of process