38 #if defined(LESENSE_COUNT) && (LESENSE_COUNT > 0)
58 #define LESENSE_NUM_DECODER_STATES (_LESENSE_DECSTATE_DECSTATE_MASK + 1)
61 #define LESENSE_NUM_CHANNELS 16
81 } LESENSE_ClkPresc_TypeDef;
88 lesenseScanStartPeriodic = LESENSE_CTRL_SCANMODE_PERIODIC,
91 lesenseScanStartOneShot = LESENSE_CTRL_SCANMODE_ONESHOT,
94 lesenseScanStartPRS = LESENSE_CTRL_SCANMODE_PRS
95 } LESENSE_ScanMode_TypeDef;
107 #if defined( LESENSE_CTRL_PRSSEL_PRSCH4 )
110 #if defined( LESENSE_CTRL_PRSSEL_PRSCH5 )
113 #if defined( LESENSE_CTRL_PRSSEL_PRSCH6 )
116 #if defined( LESENSE_CTRL_PRSSEL_PRSCH7 )
119 #if defined( LESENSE_CTRL_PRSSEL_PRSCH8 )
122 #if defined( LESENSE_CTRL_PRSSEL_PRSCH9 )
125 #if defined( LESENSE_CTRL_PRSSEL_PRSCH10 )
128 #if defined( LESENSE_CTRL_PRSSEL_PRSCH11 )
131 } LESENSE_PRSSel_TypeDef;
138 lesenseAltExMapALTEX = _LESENSE_CTRL_ALTEXMAP_ALTEX,
140 #if defined(_LESENSE_CTRL_ALTEXMAP_ACMP)
142 lesenseAltExMapACMP = _LESENSE_CTRL_ALTEXMAP_ACMP,
145 #if defined(_LESENSE_CTRL_ALTEXMAP_CH)
148 lesenseAltExMapCH = _LESENSE_CTRL_ALTEXMAP_CH,
150 } LESENSE_AltExMap_TypeDef;
157 lesenseBufTrigHalf = LESENSE_CTRL_BUFIDL_HALFFULL,
160 lesenseBufTrigFull = LESENSE_CTRL_BUFIDL_FULL
161 } LESENSE_BufTrigLevel_TypeDef;
168 lesenseDMAWakeUpDisable = LESENSE_CTRL_DMAWU_DISABLE,
171 lesenseDMAWakeUpBufValid = LESENSE_CTRL_DMAWU_BUFDATAV,
176 lesenseDMAWakeUpBufLevel = LESENSE_CTRL_DMAWU_BUFLEVEL
177 } LESENSE_DMAWakeUp_TypeDef;
184 lesenseBiasModeDutyCycle = LESENSE_BIASCTRL_BIASMODE_DUTYCYCLE,
187 lesenseBiasModeHighAcc = LESENSE_BIASCTRL_BIASMODE_HIGHACC,
190 lesenseBiasModeDontTouch = LESENSE_BIASCTRL_BIASMODE_DONTTOUCH
191 } LESENSE_BiasMode_TypeDef;
199 lesenseScanConfDirMap = LESENSE_CTRL_SCANCONF_DIRMAP,
203 lesenseScanConfInvMap = LESENSE_CTRL_SCANCONF_INVMAP,
207 lesenseScanConfToggle = LESENSE_CTRL_SCANCONF_TOGGLE,
211 lesenseScanConfDecDef = LESENSE_CTRL_SCANCONF_DECDEF
212 } LESENSE_ScanConfSel_TypeDef;
220 lesenseDACIfData = _LESENSE_PERCTRL_DACCH0DATA_DACDATA,
222 #if defined(_LESENSE_PERCTRL_DACCH0DATA_ACMPTHRES)
225 lesenseACMPThres = _LESENSE_PERCTRL_DACCH0DATA_ACMPTHRES,
228 #if defined(_LESENSE_PERCTRL_DACCH0DATA_THRES)
231 lesenseThres = _LESENSE_PERCTRL_DACCH0DATA_THRES,
233 } LESENSE_ControlDACData_TypeDef;
235 #if defined(_LESENSE_PERCTRL_DACCH0CONV_MASK)
241 lesenseDACConvModeDisable = _LESENSE_PERCTRL_DACCH0CONV_DISABLE,
245 lesenseDACConvModeContinuous = _LESENSE_PERCTRL_DACCH0CONV_CONTINUOUS,
249 lesenseDACConvModeSampleHold = _LESENSE_PERCTRL_DACCH0CONV_SAMPLEHOLD,
253 lesenseDACConvModeSampleOff = _LESENSE_PERCTRL_DACCH0CONV_SAMPLEOFF
254 } LESENSE_ControlDACConv_TypeDef;
257 #if defined(_LESENSE_PERCTRL_DACCH0OUT_MASK)
263 lesenseDACOutModeDisable = _LESENSE_PERCTRL_DACCH0OUT_DISABLE,
267 lesenseDACOutModePin = _LESENSE_PERCTRL_DACCH0OUT_PIN,
271 lesenseDACOutModeADCACMP = _LESENSE_PERCTRL_DACCH0OUT_ADCACMP,
275 lesenseDACOutModePinADCACMP = _LESENSE_PERCTRL_DACCH0OUT_PINADCACMP
276 } LESENSE_ControlDACOut_TypeDef;
280 #if defined(_LESENSE_PERCTRL_DACREF_MASK)
285 lesenseDACRefVdd = LESENSE_PERCTRL_DACREF_VDD,
288 lesenseDACRefBandGap = LESENSE_PERCTRL_DACREF_BANDGAP
289 } LESENSE_DACRef_TypeDef;
298 lesenseACMPModeDisable = _LESENSE_PERCTRL_ACMP0MODE_DISABLE,
302 lesenseACMPModeMux = _LESENSE_PERCTRL_ACMP0MODE_MUX,
306 lesenseACMPModeMuxThres = _LESENSE_PERCTRL_ACMP0MODE_MUXTHRES
307 } LESENSE_ControlACMP_TypeDef;
314 lesenseWarmupModeNormal = LESENSE_PERCTRL_WARMUPMODE_NORMAL,
317 lesenseWarmupModeACMP = LESENSE_PERCTRL_WARMUPMODE_KEEPACMPWARM,
320 lesenseWarmupModeDAC = LESENSE_PERCTRL_WARMUPMODE_KEEPDACWARM,
323 lesenseWarmupModeKeepWarm = LESENSE_PERCTRL_WARMUPMODE_KEEPACMPDACWARM
324 } LESENSE_WarmupMode_TypeDef;
331 lesenseDecInputSensorSt = LESENSE_DECCTRL_INPUT_SENSORSTATE,
334 lesenseDecInputPRS = LESENSE_DECCTRL_INPUT_PRS
335 } LESENSE_DecInput_TypeDef;
342 lesenseSampleModeCounter = 0x0 << _LESENSE_CH_INTERACT_SAMPLE_SHIFT,
345 lesenseSampleModeACMP = LESENSE_CH_INTERACT_SAMPLE_ACMP,
347 #if defined(LESENSE_CH_INTERACT_SAMPLE_ADC)
349 lesenseSampleModeADC = LESENSE_CH_INTERACT_SAMPLE_ADC,
352 lesenseSampleModeADCDiff = LESENSE_CH_INTERACT_SAMPLE_ADCDIFF,
354 } LESENSE_ChSampleMode_TypeDef;
361 lesenseSetIntNone = LESENSE_CH_INTERACT_SETIF_NONE,
364 lesenseSetIntLevel = LESENSE_CH_INTERACT_SETIF_LEVEL,
367 lesenseSetIntPosEdge = LESENSE_CH_INTERACT_SETIF_POSEDGE,
370 lesenseSetIntNegEdge = LESENSE_CH_INTERACT_SETIF_NEGEDGE
371 } LESENSE_ChIntMode_TypeDef;
378 lesenseChPinExDis = LESENSE_CH_INTERACT_EXMODE_DISABLE,
381 lesenseChPinExHigh = LESENSE_CH_INTERACT_EXMODE_HIGH,
384 lesenseChPinExLow = LESENSE_CH_INTERACT_EXMODE_LOW,
387 lesenseChPinExDACOut = LESENSE_CH_INTERACT_EXMODE_DACOUT
388 } LESENSE_ChPinExMode_TypeDef;
396 lesenseChPinIdleDis = _LESENSE_IDLECONF_CH0_DISABLE,
400 lesenseChPinIdleHigh = _LESENSE_IDLECONF_CH0_HIGH,
404 lesenseChPinIdleLow = _LESENSE_IDLECONF_CH0_LOW,
406 #if defined(_LESENSE_IDLECONF_CH0_DAC)
409 lesenseChPinIdleDACC = _LESENSE_IDLECONF_CH0_DAC
413 lesenseChPinIdleDACCh0 = _LESENSE_IDLECONF_CH0_DACCH0,
417 lesenseChPinIdleDACCh1 = _LESENSE_IDLECONF_CH12_DACCH1,
419 } LESENSE_ChPinIdleMode_TypeDef;
426 lesenseClkLF = _LESENSE_CH_INTERACT_EXCLK_LFACLK,
429 lesenseClkHF = _LESENSE_CH_INTERACT_EXCLK_AUXHFRCO
430 } LESENSE_ChClk_TypeDef;
438 lesenseCompModeLess = LESENSE_CH_EVAL_COMP_LESS,
442 lesenseCompModeGreaterOrEq = LESENSE_CH_EVAL_COMP_GE
443 } LESENSE_ChCompMode_TypeDef;
446 #if defined(_LESENSE_CH_EVAL_MODE_MASK)
455 lesenseEvalModeThreshold = _LESENSE_CH_EVAL_MODE_THRES,
460 lesenseEvalModeSlidingWindow = _LESENSE_CH_EVAL_MODE_SLIDINGWIN,
468 lesenseEvalModeStepDetection = _LESENSE_CH_EVAL_MODE_STEPDET,
469 } LESENSE_ChEvalMode_TypeDef;
478 lesenseAltExPinIdleDis = _LESENSE_ALTEXCONF_IDLECONF0_DISABLE,
482 lesenseAltExPinIdleHigh = _LESENSE_ALTEXCONF_IDLECONF0_HIGH,
486 lesenseAltExPinIdleLow = _LESENSE_ALTEXCONF_IDLECONF0_LOW
487 } LESENSE_AltExPinIdle_TypeDef;
495 lesenseTransActNone = LESENSE_ST_TCONFA_PRSACT_NONE,
498 lesenseTransActPRS0 = LESENSE_ST_TCONFA_PRSACT_PRS0,
501 lesenseTransActPRS1 = LESENSE_ST_TCONFA_PRSACT_PRS1,
504 lesenseTransActPRS01 = LESENSE_ST_TCONFA_PRSACT_PRS01,
507 lesenseTransActPRS2 = LESENSE_ST_TCONFA_PRSACT_PRS2,
510 lesenseTransActPRS02 = LESENSE_ST_TCONFA_PRSACT_PRS02,
513 lesenseTransActPRS12 = LESENSE_ST_TCONFA_PRSACT_PRS12,
516 lesenseTransActPRS012 = LESENSE_ST_TCONFA_PRSACT_PRS012,
519 lesenseTransActUp = LESENSE_ST_TCONFA_PRSACT_UP,
522 lesenseTransActDown = LESENSE_ST_TCONFA_PRSACT_DOWN,
525 lesenseTransActUpAndPRS2 = LESENSE_ST_TCONFA_PRSACT_UPANDPRS2,
528 lesenseTransActDownAndPRS2 = LESENSE_ST_TCONFA_PRSACT_DOWNANDPRS2
529 } LESENSE_StTransAct_TypeDef;
540 LESENSE_ScanMode_TypeDef scanStart;
543 LESENSE_PRSSel_TypeDef prsSel;
546 LESENSE_ScanConfSel_TypeDef scanConfSel;
566 LESENSE_BufTrigLevel_TypeDef bufTrigLevel;
569 LESENSE_DMAWakeUp_TypeDef wakeupOnDMA;
572 LESENSE_BiasMode_TypeDef biasMode;
576 } LESENSE_CoreCtrlDesc_TypeDef;
579 #define LESENSE_CORECTRL_DESC_DEFAULT \
581 lesenseScanStartPeriodic, \
583 lesenseScanConfDirMap, \
589 lesenseBufTrigHalf, \
590 lesenseDMAWakeUpDisable, \
591 lesenseBiasModeDontTouch, \
606 bool delayAuxStartup;
607 } LESENSE_TimeCtrlDesc_TypeDef;
610 #define LESENSE_TIMECTRL_DESC_DEFAULT \
621 LESENSE_ControlDACData_TypeDef dacCh0Data;
623 #if defined(_LESENSE_PERCTRL_DACCH0CONV_MASK)
625 LESENSE_ControlDACConv_TypeDef dacCh0ConvMode;
628 LESENSE_ControlDACOut_TypeDef dacCh0OutMode;
632 LESENSE_ControlDACData_TypeDef dacCh1Data;
634 #if defined(_LESENSE_PERCTRL_DACCH1CONV_MASK)
636 LESENSE_ControlDACConv_TypeDef dacCh1ConvMode;
639 LESENSE_ControlDACOut_TypeDef dacCh1OutMode;
642 #if defined(_LESENSE_PERCTRL_DACPRESC_MASK)
648 #if defined(_LESENSE_PERCTRL_DACREF_MASK)
651 LESENSE_DACRef_TypeDef dacRef;
655 LESENSE_ControlACMP_TypeDef acmp0Mode;
658 LESENSE_ControlACMP_TypeDef acmp1Mode;
661 LESENSE_WarmupMode_TypeDef warmupMode;
663 #if defined(_LESENSE_PERCTRL_DACCONVTRIG_MASK)
668 } LESENSE_PerCtrlDesc_TypeDef;
671 #if defined(_SILICON_LABS_32B_SERIES_0)
672 #define LESENSE_PERCTRL_DESC_DEFAULT \
675 lesenseDACConvModeDisable, \
676 lesenseDACOutModeDisable, \
678 lesenseDACConvModeDisable, \
679 lesenseDACOutModeDisable, \
682 lesenseACMPModeMuxThres, \
683 lesenseACMPModeMuxThres, \
684 lesenseWarmupModeKeepWarm, \
687 #define LESENSE_PERCTRL_DESC_DEFAULT \
691 lesenseACMPModeMuxThres, \
692 lesenseACMPModeMuxThres, \
693 lesenseWarmupModeKeepWarm, \
702 LESENSE_DecInput_TypeDef decInput;
736 LESENSE_PRSSel_TypeDef prsChSel0;
739 LESENSE_PRSSel_TypeDef prsChSel1;
742 LESENSE_PRSSel_TypeDef prsChSel2;
745 LESENSE_PRSSel_TypeDef prsChSel3;
746 } LESENSE_DecCtrlDesc_TypeDef;
749 #define LESENSE_DECCTRL_DESC_DEFAULT \
751 lesenseDecInputSensorSt, \
771 LESENSE_CoreCtrlDesc_TypeDef coreCtrl;
774 LESENSE_TimeCtrlDesc_TypeDef timeCtrl;
777 LESENSE_PerCtrlDesc_TypeDef perCtrl;
780 LESENSE_DecCtrlDesc_TypeDef decCtrl;
781 } LESENSE_Init_TypeDef;
784 #define LESENSE_INIT_DEFAULT \
786 .coreCtrl = LESENSE_CORECTRL_DESC_DEFAULT, \
787 .timeCtrl = LESENSE_TIMECTRL_DESC_DEFAULT, \
788 .perCtrl = LESENSE_PERCTRL_DESC_DEFAULT, \
789 .decCtrl = LESENSE_DECCTRL_DESC_DEFAULT \
808 LESENSE_ChPinExMode_TypeDef chPinExMode;
811 LESENSE_ChPinIdleMode_TypeDef chPinIdleMode;
828 LESENSE_ChClk_TypeDef exClk;
831 LESENSE_ChClk_TypeDef sampleClk;
860 LESENSE_ChSampleMode_TypeDef sampleMode;
863 LESENSE_ChIntMode_TypeDef intMode;
870 LESENSE_ChCompMode_TypeDef compMode;
872 #if defined(_LESENSE_CH_EVAL_MODE_MASK)
874 LESENSE_ChEvalMode_TypeDef evalMode;
877 } LESENSE_ChDesc_TypeDef;
884 LESENSE_ChDesc_TypeDef Ch[LESENSE_NUM_CHANNELS];
885 } LESENSE_ChAll_TypeDef;
888 #if defined(_LESENSE_CH_EVAL_MODE_MASK)
889 #define LESENSE_CH_CONF_DEFAULT \
894 lesenseChPinExHigh, \
895 lesenseChPinIdleLow, \
906 lesenseSampleModeACMP, \
909 lesenseCompModeLess, \
910 lesenseEvalModeThreshold \
913 #define LESENSE_CH_CONF_DEFAULT \
918 lesenseChPinExHigh, \
919 lesenseChPinIdleLow, \
930 lesenseSampleModeACMP, \
933 lesenseCompModeLess \
939 #define LESENSE_SCAN_CONF_DEFAULT \
942 LESENSE_CH_CONF_DEFAULT, \
943 LESENSE_CH_CONF_DEFAULT, \
944 LESENSE_CH_CONF_DEFAULT, \
945 LESENSE_CH_CONF_DEFAULT, \
946 LESENSE_CH_CONF_DEFAULT, \
947 LESENSE_CH_CONF_DEFAULT, \
948 LESENSE_CH_CONF_DEFAULT, \
949 LESENSE_CH_CONF_DEFAULT, \
950 LESENSE_CH_CONF_DEFAULT, \
951 LESENSE_CH_CONF_DEFAULT, \
952 LESENSE_CH_CONF_DEFAULT, \
953 LESENSE_CH_CONF_DEFAULT, \
954 LESENSE_CH_CONF_DEFAULT, \
955 LESENSE_CH_CONF_DEFAULT, \
956 LESENSE_CH_CONF_DEFAULT, \
957 LESENSE_CH_CONF_DEFAULT, \
971 LESENSE_AltExPinIdle_TypeDef idleConf;
981 } LESENSE_AltExDesc_TypeDef;
988 LESENSE_AltExMap_TypeDef altExMap;
1002 LESENSE_AltExDesc_TypeDef AltEx[16];
1004 } LESENSE_ConfAltEx_TypeDef;
1008 #define LESENSE_ALTEX_CH_CONF_DEFAULT \
1011 lesenseAltExPinIdleDis, \
1016 #if defined(_LESENSE_CTRL_ALTEXMAP_ACMP)
1017 #define LESENSE_ALTEX_CONF_DEFAULT \
1019 lesenseAltExMapACMP, \
1021 LESENSE_ALTEX_CH_CONF_DEFAULT, \
1022 LESENSE_ALTEX_CH_CONF_DEFAULT, \
1023 LESENSE_ALTEX_CH_CONF_DEFAULT, \
1024 LESENSE_ALTEX_CH_CONF_DEFAULT, \
1025 LESENSE_ALTEX_CH_CONF_DEFAULT, \
1026 LESENSE_ALTEX_CH_CONF_DEFAULT, \
1027 LESENSE_ALTEX_CH_CONF_DEFAULT, \
1028 LESENSE_ALTEX_CH_CONF_DEFAULT, \
1029 LESENSE_ALTEX_CH_CONF_DEFAULT, \
1030 LESENSE_ALTEX_CH_CONF_DEFAULT, \
1031 LESENSE_ALTEX_CH_CONF_DEFAULT, \
1032 LESENSE_ALTEX_CH_CONF_DEFAULT, \
1033 LESENSE_ALTEX_CH_CONF_DEFAULT, \
1034 LESENSE_ALTEX_CH_CONF_DEFAULT, \
1035 LESENSE_ALTEX_CH_CONF_DEFAULT, \
1036 LESENSE_ALTEX_CH_CONF_DEFAULT \
1040 #define LESENSE_ALTEX_CONF_DEFAULT \
1042 lesenseAltExMapCH, \
1044 LESENSE_ALTEX_CH_CONF_DEFAULT, \
1045 LESENSE_ALTEX_CH_CONF_DEFAULT, \
1046 LESENSE_ALTEX_CH_CONF_DEFAULT, \
1047 LESENSE_ALTEX_CH_CONF_DEFAULT, \
1048 LESENSE_ALTEX_CH_CONF_DEFAULT, \
1049 LESENSE_ALTEX_CH_CONF_DEFAULT, \
1050 LESENSE_ALTEX_CH_CONF_DEFAULT, \
1051 LESENSE_ALTEX_CH_CONF_DEFAULT, \
1052 LESENSE_ALTEX_CH_CONF_DEFAULT, \
1053 LESENSE_ALTEX_CH_CONF_DEFAULT, \
1054 LESENSE_ALTEX_CH_CONF_DEFAULT, \
1055 LESENSE_ALTEX_CH_CONF_DEFAULT, \
1056 LESENSE_ALTEX_CH_CONF_DEFAULT, \
1057 LESENSE_ALTEX_CH_CONF_DEFAULT, \
1058 LESENSE_ALTEX_CH_CONF_DEFAULT, \
1059 LESENSE_ALTEX_CH_CONF_DEFAULT \
1082 LESENSE_StTransAct_TypeDef prsAct;
1086 } LESENSE_DecStCond_TypeDef;
1089 #define LESENSE_ST_CONF_DEFAULT \
1094 lesenseTransActNone, \
1108 LESENSE_DecStCond_TypeDef confA;
1112 LESENSE_DecStCond_TypeDef confB;
1113 } LESENSE_DecStDesc_TypeDef;
1120 LESENSE_DecStDesc_TypeDef St[LESENSE_NUM_DECODER_STATES];
1121 } LESENSE_DecStAll_TypeDef;
1124 #if defined(_SILICON_LABS_32B_SERIES_0)
1125 #define LESENSE_DECODER_CONF_DEFAULT \
1128 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1129 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1130 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1131 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1132 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1133 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1134 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1135 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1136 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1137 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1138 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1139 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1140 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1141 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1142 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1143 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT } \
1147 #define LESENSE_DECODER_CONF_DEFAULT \
1150 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1151 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1152 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1153 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1154 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1155 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1156 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1157 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1158 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1159 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1160 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1161 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1162 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1163 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1164 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1165 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1166 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1167 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1168 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1169 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1170 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1171 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1172 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1173 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1174 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1175 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1176 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1177 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1178 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1179 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1180 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT }, \
1181 { false, LESENSE_ST_CONF_DEFAULT, LESENSE_ST_CONF_DEFAULT } \
1189 void LESENSE_Init(
const LESENSE_Init_TypeDef * init,
bool reqReset);
1190 void LESENSE_Reset(
void);
1192 uint32_t LESENSE_ScanFreqSet(uint32_t refFreq, uint32_t scanFreq);
1193 void LESENSE_ScanModeSet(LESENSE_ScanMode_TypeDef scanMode,
bool start);
1194 void LESENSE_StartDelaySet(uint8_t startDelay);
1195 void LESENSE_ClkDivSet(LESENSE_ChClk_TypeDef clk,
1196 LESENSE_ClkPresc_TypeDef clkDiv);
1198 void LESENSE_ChannelAllConfig(
const LESENSE_ChAll_TypeDef * confChAll);
1199 void LESENSE_ChannelConfig(
const LESENSE_ChDesc_TypeDef * confCh,
1201 void LESENSE_ChannelEnable(uint8_t chIdx,
1204 void LESENSE_ChannelEnableMask(uint16_t chMask, uint16_t pinMask);
1205 void LESENSE_ChannelTimingSet(uint8_t chIdx,
1207 uint8_t sampleDelay,
1208 uint16_t measDelay);
1209 void LESENSE_ChannelThresSet(uint8_t chIdx,
1212 #if defined(_LESENSE_CH_EVAL_MODE_MASK)
1213 void LESENSE_ChannelSlidingWindow(uint8_t chIdx,
1214 uint32_t windowSize,
1215 uint32_t initValue);
1216 void LESENSE_ChannelStepDetection(uint8_t chIdx,
1218 uint32_t initValue);
1219 void LESENSE_WindowSizeSet(uint32_t windowSize);
1220 void LESENSE_StepSizeSet(uint32_t stepSize);
1223 void LESENSE_AltExConfig(
const LESENSE_ConfAltEx_TypeDef * confAltEx);
1225 void LESENSE_DecoderStateAllConfig(
const LESENSE_DecStAll_TypeDef * confDecStAll);
1226 void LESENSE_DecoderStateConfig(
const LESENSE_DecStDesc_TypeDef * confDecSt,
1228 void LESENSE_DecoderStateSet(uint32_t decSt);
1229 uint32_t LESENSE_DecoderStateGet(
void);
1230 #if defined(_LESENSE_PRSCTRL_MASK)
1231 void LESENSE_DecoderPrsOut(
bool enable, uint32_t decMask, uint32_t decCmp);
1234 void LESENSE_ScanStart(
void);
1235 void LESENSE_ScanStop(
void);
1236 void LESENSE_DecoderStart(
void);
1237 void LESENSE_ResultBufferClear(
void);
1248 __STATIC_INLINE
void LESENSE_DecoderStop(
void)
1251 LESENSE->DECCTRL |= LESENSE_DECCTRL_DISABLE;
1269 __STATIC_INLINE uint32_t LESENSE_StatusGet(
void)
1271 return LESENSE->STATUS;
1295 __STATIC_INLINE
void LESENSE_StatusWait(uint32_t flag)
1297 while (!(LESENSE->STATUS & flag))
1310 __STATIC_INLINE uint32_t LESENSE_ChannelActiveGet(
void)
1312 return LESENSE->CURCH;
1327 __STATIC_INLINE uint32_t LESENSE_ScanResultGet(
void)
1329 return LESENSE->SCANRES & _LESENSE_SCANRES_SCANRES_MASK;
1346 __STATIC_INLINE uint32_t LESENSE_ScanResultDataGet(
void)
1348 return LESENSE->BUFDATA;
1367 __STATIC_INLINE uint32_t LESENSE_ScanResultDataBufferGet(uint32_t idx)
1370 return LESENSE->BUF[idx & 0x0FU].DATA;
1381 __STATIC_INLINE uint32_t LESENSE_SensorStateGet(
void)
1383 return LESENSE->SENSORSTATE;
1387 #if defined(LESENSE_POWERDOWN_RAM)
1400 __STATIC_INLINE
void LESENSE_RAMPowerDown(
void)
1403 LESENSE->POWERDOWN = LESENSE_POWERDOWN_RAM;
1417 __STATIC_INLINE
void LESENSE_IntClear(uint32_t flags)
1419 LESENSE->IFC = flags;
1432 __STATIC_INLINE
void LESENSE_IntEnable(uint32_t flags)
1434 LESENSE->IEN |= flags;
1447 __STATIC_INLINE
void LESENSE_IntDisable(uint32_t flags)
1449 LESENSE->IEN &= ~flags;
1462 __STATIC_INLINE
void LESENSE_IntSet(uint32_t flags)
1464 LESENSE->IFS = flags;
1479 __STATIC_INLINE uint32_t LESENSE_IntGet(
void)
1503 __STATIC_INLINE uint32_t LESENSE_IntGetEnabled(
void)
1512 return LESENSE->IF & tmp;
CMSIS Cortex-M Peripheral Access Layer for Silicon Laboratories microcontroller devices.