<CUE>
Board BEHAVIOR for peripherals on TWELITE CUE.
It can handle accelerometers, magnetic sensors, and LEDs on the board.
Accelerometer
Magnetic sensor
LEDs
The MC3630 sensor member object (sns_MC3630) is defined.
The sensor of the open/close sensor pal is a magnetic sensor, which is the only input for the interrupt of the two signal lines.
The PAL_MAG::PIN_SNS_NORTH
is interrupted when the sensor detects an N-pole and the PAL_MAG::PIN_SNS_SOUTH
is interrupted when the sensor detects an N-pole.
The following settings should be made before sleep
Check the IO of the waking factor upon waking.
LED (D1) control.
Do not call this method if you do not want to control with board BEHAVIOR.
The mode
takes the following parameters. tick
specifies the lighting time [ms], see the description of mode
for details.
The setting before the return to sleep is maintained after the return to sleep.
Turns on the LED for a specified period of time. Cannot be used with set_led()
function at the same time.
Resets the external watchdog timer at startup, sleep wakeup, and after a certain period of time after startup.
Wake TWELITE within 60 seconds (when using calibrated internal CR timer) to avoid watchdog timer timeout.
Designation | Meaning |
---|---|
LED_TIMER::BLINK
Blinks the LED. ON/OFF is toggled every [ms] of time given to tick
. After returning from sleep, it resets the count and starts from the lit state.
LED_TIMER::ON_RX
When a packet is received, it turns on for the time given to the tick
, LED_TIMER::ON_RX
.
LED_TIMER::ON_TX_COMP
Turns on for the time given to the tick
when the transmission is completed.