
30
System hardware interface channel events
2 Application Programming Interface (API)
PHD API Reference
nxs.wakeup_reason
Event
nxs.wakeup_reason
Event Data
Keys
Values
Description
wakeup_reason
0x0001 – GPIO6
0x0002 – GPIO2
0x0004 – GPIO3
0x0008 – GPIO4
0x0010 – GPIO5
0x0020 – GPIO1
0x0040 – GPIO7
0x0080 – GPIO8
0x0200 – TOUCH
0x0400 – CAN1_RX
0x0800 – CAN2_RX
A 16-bit value with each bit representing
the wakeup source.
Direction
input
Channel
nxs
Notes
Received by the application in response to being woken up.
The example below assumes the Storyboard application is set up to call Lua function
wakeup_reason_receive
when the
nxs.wakeup_reason
event occurs. Event data is
available through the
mapargs
argument.
Lua Example
function
wakeup_reason_receive
(
mapargs
)
local
ev
=
mapargs
.context_event_data
local
wakeup
=
ev
["
wakeup_reason
"]
if
(
wakeups
~=
nil
)
then
if
(
bit32
.band(
wakeup
,
0x0001
) ~=
0x0000
)
then
("
Wokeup by GPIO6.
")
end
end
-- Other Wakeup reasons left as an exercise
end
Содержание PHD28
Страница 1: ...Parker Hannifin Display PHD User Guide UG PHD 1040001 201707 010...
Страница 52: ...44 PHD Mounting the PHD 9 1 2 PHD50 Figure 18 PHD50 dimensions mm...
Страница 53: ...User Guide 45 Mounting the PHD 9 1 3 PHD70 Figure 19 PHD70 dimensions mm...
Страница 58: ...Parker Hannifin Display PHD User Guide HY33 5021 IB US...
Страница 59: ...PHD Network Interface Configuration Publ no HY33 5021 M1 UK Edition 2017 02 02...
Страница 75: ...PHD API Reference Publ no HY33 5021 M2 UK Edition 2017 02 13...