zephyr/include
Laczen JMS c20ff1150f subsys/settings: Enable handler ROM registration
Add the possibility to register handles to ROM using a new macro
SETTINGS_REGISTER_STATIC(handler), the handler is of type
settings_handler_stat and has to be declared as const:

```
const struct settings_handler_stat test_handler = {
	.name = "test", /* this can also be "ps/data"
	.h_get = get,
	.h_set = set,
	.h_commit = NULL, /* NULL defines can be ommited */
	.h_export = NULL  /* NULL defines can be ommited */
};
SETTINGS_REGISTER_STATIC(test_handler);
```

To maintain support for handlers stored in RAM (dynamic handlers)
`CONFIG_SETTINGS_DYNAMIC_HANDLERS`must be enabled, which is by default.

When registering static handlers there is no check if this handler has
been registered earlier, the latest registered static handler will be
considered valid for any set/get routine, while the commit and export
routines will be executed for both registered handlers.

When a dynamic handler is registered a check is done to see if there was
an earlier registration of the name as a static or dynamic handler
registration will fail.

To get to the lowest possible RAM usage it is advised to set
`CONFIG_SETTINGS_DYNAMIC_HANDLERS=n`.

Updates:

a. Changed usage of RAM to DYNAMIC/dynamic, ROM to STATIC/static
b. Updated settings.h to remove added #if defined()
c. Make static handlers always enabled
d. Corrected error introduced in common-rom.ld.
e. Changed return value of settings_parse_and_lookup to
   settings_handler_stat type to reduce stack usage.
f. Updated the name generated to store a handler item in ROM. It now
   uses the name used to register in combination with the line where
   SETTINGS_REGISTER_STATIC() is called.
g. renamed settings_handler_stat type to settings_handler_static
h. renamed SETTINGS_REGISTER_STATIC to SETTINGS_STATIC_HANDLER_DEFINE()

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2019-06-26 16:31:01 +02:00
..
app_memory
arch
audio
bluetooth
cmsis_rtos_v1
cmsis_rtos_v2
crypto
debug
dfu
display
drivers
dt-bindings
fs
linker
logging
mgmt
misc
net
nvs
posix
random
settings subsys/settings: Enable handler ROM registration 2019-06-26 16:31:01 +02:00
shell
toolchain
usb
zephyr
adc.h
aio_comparator.h
atomic.h
base64.h
cache.h
can.h
clock_control.h
console.h
counter.h
crc.h
device.h
disk_access.h
display.h
dma.h
entropy.h
exc_handle.h
fcb.h
flash_map.h
flash.h
fs.h
generated_dts_board.h
gna.h
gpio.h
hwinfo.h
i2c.h
i2s.h
init.h
ipm.h
irq_nextlevel.h
irq_offload.h
irq.h
json.h
kernel_includes.h
kernel_version.h
kernel.h
led_strip.h
led.h
pinmux.h
power.h
ptp_clock.h
pwm.h
ring_buffer.h
rtc.h
sched_priq.h
sensor.h
shared_irq.h
spi.h
spinlock.h
stats.h
sw_isr_table.h
sys_clock.h
sys_io.h
syscall.h
toolchain.h
tracing.h
tty.h
uart.h
updatehub.h
watchdog.h
zephyr.h