Developer World
Spresense SDK Library v3.2.0-ebc0364
IOCTL commands
Collaboration diagram for IOCTL commands:

Macros

#define SCUIOC_SETFIFO   _SCUIOC(0x0001)
 
#define SCUIOC_FREEFIFO   _SCUIOC(0x0002)
 
#define SCUIOC_SETSAMPLE   _SCUIOC(0x0003)
 
#define SCUIOC_SETSIGNCONV   _SCUIOC(0x0004)
 
#define SCUIOC_SETOGADJUST   _SCUIOC(0x0005)
 
#define SCUIOC_CLROGADJUST   _SCUIOC(0x0006)
 
#define SCUIOC_SETFILTER   _SCUIOC(0x0007)
 
#define SCUIOC_SETNOTIFY   _SCUIOC(0x0008)
 
#define SCUIOC_SETELEMENTS   _SCUIOC(0x0009)
 
#define SCUIOC_SETDECIMATION   _SCUIOC(0x000a)
 
#define SCUIOC_SETWATERMARK   _SCUIOC(0x000b)
 
#define SCUIOC_START   _SCUIOC(0x0010)
 
#define SCUIOC_STOP   _SCUIOC(0x0011)
 
#define SCUIOC_SETFIFOMODE   _SCUIOC(0x0012)
 
#define SCUIOC_DELFIFODATA   _SCUIOC(0x0013)
 

Detailed Description

Macro Definition Documentation

◆ SCUIOC_SETFIFO

#define SCUIOC_SETFIFO   _SCUIOC(0x0001)

Set FIFO size used by sequencer

Parameters
uint16_tFIFO size in bytes
Returns
ioctl return value provides success/failure indication

◆ SCUIOC_FREEFIFO

#define SCUIOC_FREEFIFO   _SCUIOC(0x0002)

Free FIFO used by sequencer

Parameters
None
Returns
ioctl return value provides success/failure indication

◆ SCUIOC_SETSAMPLE

#define SCUIOC_SETSAMPLE   _SCUIOC(0x0003)

Set sequencer sampling rate

Parameters
uint8_tsampling rate
Returns
ioctl return value provides success/failure indication

◆ SCUIOC_SETSIGNCONV

#define SCUIOC_SETSIGNCONV   _SCUIOC(0x0004)

Enable/Disable sign conversion preprocessing

Parameters
unsignedlong: 0 = disable, 1 = enable
Returns
ioctl return value provides success/failure indication

◆ SCUIOC_SETOGADJUST

#define SCUIOC_SETOGADJUST   _SCUIOC(0x0005)

Set offset/gain adjustment parameter

Parameters
Pointerto struct adjust_xyz_s.
Returns
ioctl return value provides success/failure indication

◆ SCUIOC_CLROGADJUST

#define SCUIOC_CLROGADJUST   _SCUIOC(0x0006)

Clear offset/gain adjustment parameter

Parameters
None
Returns
ioctl return value provides success/failure indication

◆ SCUIOC_SETFILTER

#define SCUIOC_SETFILTER   _SCUIOC(0x0007)

Set IIR filter coefficiencies

Parameters
Pointerto struct math_filter_s
Returns
ioctl return value provides success/failure indication

◆ SCUIOC_SETNOTIFY

#define SCUIOC_SETNOTIFY   _SCUIOC(0x0008)

Set event notifier parameters

Set event notifier. This command must use with IIR filter, so it will be error when no filter set by SCUIOC_SETFILTER.

Parameters
Pointerto struct scuev_notify_s
Returns
ioctl return value provides success/failure indication

◆ SCUIOC_SETELEMENTS

#define SCUIOC_SETELEMENTS   _SCUIOC(0x0009)

Set elements per sample

SCU can be treat 3 axis sample data as 1 or 2 axis data. For example, user can be used to detect via event notifier, about the board is tilting, by X and Y axis data from accelerometer. This setting will be affected for IIR Filter and event notifier.

Parameters
unsignedlong: 1 - 3
Returns
ioctl return value provides success/failure indication

◆ SCUIOC_SETDECIMATION

#define SCUIOC_SETDECIMATION   _SCUIOC(0x000a)

Set decimation parameters (Decimator only)

Parameters
Pointerto struct decimation_s
Returns
ioctl return value provides success/failure indication

◆ SCUIOC_SETWATERMARK

#define SCUIOC_SETWATERMARK   _SCUIOC(0x000b)

Set FIFO sample data watermark

Parameters
Pointerof struct scufifo_wm_s
Returns
ioctl return value provides success/failure indication

◆ SCUIOC_START

#define SCUIOC_START   _SCUIOC(0x0010)

Start sequencer

Parameters
None
Returns
ioctl return value provides success/failure indication

◆ SCUIOC_STOP

#define SCUIOC_STOP   _SCUIOC(0x0011)

Stop sequencer

Parameters
None
Returns
ioctl return value provides success/failure indication

◆ SCUIOC_SETFIFOMODE

#define SCUIOC_SETFIFOMODE   _SCUIOC(0x0012)

Set FIFO overwrite mode

Parameters
unsignedlong: 0 = overwrite disable, 1 = overwrite enable
Returns
ioctl return value provides success/failure indication

◆ SCUIOC_DELFIFODATA

#define SCUIOC_DELFIFODATA   _SCUIOC(0x0013)

Delete FIFO data

Parameters
uint16_tdelete size
Returns
ioctl return value provides success/failure indication