<CUE>
<CUE>
Board BEHAVIOR for peripherals on TWELITE CUE.
It can handle accelerometers, magnetic sensors, and LEDs on the board.
Accelerometer
Magnetic sensor
LEDs
Accelerometer
The MC3630 sensor member object (sns_MC3630) is defined.
Magnetic sensor
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
set_led()
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.
Designation | Meaning |
---|---|
| Blinks the LED. ON/OFF is toggled every [ms] of time given to |
| When a packet is received, it turns on for the time given to the |
| Turns on for the time given to the |
The setting before the return to sleep is maintained after the return to sleep.
led_one_shot()
Turns on the LED for a specified period of time. Cannot be used with set_led()
function at the same time.
watchdog timer
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.
最終更新