599fa46766
- New drivers: - SD SPI - spi_peripheral - touch_placeholder - display_placeholder - Devicetree compiler: - Implement phandle-arrays - Implement device addresses - Add placeholder drivers to all devices with a SPI display - SPI driver: add `cs-pins` and set them to high on driver start - FileSystem: add `file_system_set_owner()` and `file_system_get_owner()` - File locking is now checking if the related `FileSystem` is part of a shared SPI bus - Add `device_get_child_count()` - SDMMC driver: Remove default of `slot` value - Fix for Crowpanel Basic 3.5" display (add delay to booting) - Fix for LilyGO T-HMI SD card mounting (delayed mounting by disabling it initially in the dts)
55 lines
1.4 KiB
Plaintext
55 lines
1.4 KiB
Plaintext
%import common.DIGIT -> DIGIT
|
|
%import common.LETTER -> LETTER
|
|
%import common.HEXDIGIT -> HEXDIGIT
|
|
%import common.SIGNED_INT -> SIGNED_INT
|
|
%import common.WS -> WS
|
|
%import common.SIGNED_NUMBER -> SIGNED_NUMBER
|
|
%import common.ESCAPED_STRING -> ESCAPED_STRING
|
|
%ignore WS
|
|
|
|
// Comment
|
|
|
|
SINGLE_LINE_COMMENT: /\/\/[^\n]*/
|
|
MULTI_LINE_COMMENT: /\/\*([^*]|\*+[^*\/])*\*+\//
|
|
%ignore SINGLE_LINE_COMMENT
|
|
%ignore MULTI_LINE_COMMENT
|
|
|
|
// Boolean
|
|
|
|
BOOLEAN: "true" | "false"
|
|
|
|
// Main
|
|
|
|
INCLUDE_C: /#include <[\w\/.\-]+>/
|
|
DEFINE_C: /#define[^\n]+/
|
|
|
|
PROPERTY_NAME: /#?[a-zA-Z0-9_\-,]+/
|
|
|
|
QUOTE: "\""
|
|
QUOTED_TEXT: QUOTE /[^"]+/ QUOTE
|
|
quoted_text_array: QUOTED_TEXT ("," " "* QUOTED_TEXT)+
|
|
HEX_NUMBER: "0x" HEXDIGIT+
|
|
NUMBER: SIGNED_NUMBER | HEX_NUMBER
|
|
PHANDLE: /&[0-9a-zA-Z_\-]+/
|
|
C_VARIABLE: /[0-9a-zA-Z_]+/
|
|
VALUE: NUMBER | PHANDLE | C_VARIABLE
|
|
value: VALUE
|
|
values: VALUE+
|
|
array: NUMBER+
|
|
|
|
phandle_array_entry: "<" values ">"
|
|
phandle_array: phandle_array_entry ("," phandle_array_entry)+
|
|
|
|
property_value: quoted_text_array | QUOTED_TEXT | phandle_array | "<" value ">" | "<" values ">" | "[" array "]" | PHANDLE
|
|
device_property: PROPERTY_NAME ["=" property_value] ";"
|
|
|
|
NODE_ALIAS: /[a-zA-Z0-9_\-\/]+/
|
|
NODE_NAME: /[a-zA-Z0-9_\-\/]+/
|
|
NODE_ADDRESS: /[0-9a-zA-Z_]+/
|
|
|
|
device: (NODE_ALIAS ":")? NODE_NAME ("@" NODE_ADDRESS)? "{" (device | device_property)* "};"
|
|
|
|
dts_version: /[0-9a-zA-Z\-]+/
|
|
|
|
start: "/" dts_version "/;" (INCLUDE_C | DEFINE_C)* device+
|