mirror of https://github.com/arendst/Tasmota.git
Updated Sensor API (markdown)
parent
e81b408d19
commit
f6afb1e4ae
|
@ -244,10 +244,11 @@ This functions checks if the I2C address `addr` is in use.
|
|||
|
||||
|
||||
## Useful pre-processor directives
|
||||
### PSTR("string")
|
||||
#### PSTR("string")
|
||||
This pre-processor directive saves RAM by storing strings in flash instead of RAM.
|
||||
|
||||
const char MyTextStaticVariable[] PROGMEM = "string";
|
||||
#### const char MyTextStaticVariable[] PROGMEM = "string";
|
||||
|
||||
This pre-processor directive saves RAM by storing strings in flash instead of RAM.
|
||||
|
||||
You may then reference them directly (if the type matches the parameter required) or force it to 4 byte alignment by using the variable as FPSTR(MyTextStaticVariable)
|
||||
You may then reference them directly (if the type matches the parameter required) or force it to 4 byte alignment by using the variable as `FPSTR(MyTextStaticVariable)`
|
||||
|
|
Loading…
Reference in New Issue