aboutsummaryrefslogtreecommitdiff
path: root/boot/cedit.c
AgeCommit message (Collapse)Author
2023-10-11expo: Plumb in textline to ceditSimon Glass
Support textlines in the configuration editor. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-11expo: Support handling any key in ceditSimon Glass
At present cedit only supports menu keys. For textline objects we need to insert normal ASCII characters. We also need to handle backspace, which is ASCII 9. In fact, expo does not make use of all the menu keys, so partition them accordingly and update the logic to support normal ASCII characters, too. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-11expo: Add a function to write a property to a devicetreeSimon Glass
When the devicetree is too small for the property being written, we need to expand the devicetree and retry the write. Put this logic into a function so it can be reused. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-11expo: Use switch statements more for object typesSimon Glass
In a lot of cases menus are the only objects which are have their own behaviour in the cedit, e.g. to move between menus. With expo expanding to support text, this is no-longer true. Use a switch() statement so that we can simply insert a new 'case' for the new object types. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-11expo: Fix up comments for get_cur_menuitem_text() et alSimon Glass
This internal function could use a comment. Add one. Also tidy up a few other comments. Signed-off-by: Simon Glass <sjg@chromium.org> fixup: comments
2023-08-25expo: cedit: Support reading settings from CMOS RAMSimon Glass
Add a command to read edit settings from CMOS RAM, using the cedit definition to indicate which registers and bits are used. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25expo: cedit: Support writing settings to CMOS RAMSimon Glass
Add a command to write cedit settings to CMOS RAM so that it can be preserved across a reboot. This uses a simple bit-encoding, where each field has a 'bit position' and a 'bit length' in the schema. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25expo: cedit: Support reading settings from environment varsSimon Glass
Add a command to read cedit settings from environment variables so that they can be restored as part of the environment. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25expo: cedit: Support writing settings to environment varsSimon Glass
Add a command to write cedit settings to environment variables so that they can be stored with 'saveenv'. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25expo: cedit: Support reading settings from a fileSimon Glass
Add a command to read cedit settings from a devicetree file. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25expo: cedit: Support writing settings to a fileSimon Glass
Support writing settings from an expo into a file in FDT format. It consists of a single node with a two properties for each sceneitem, one with tag ID chosen by the user and another for its text value. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25expo: Add a function to prepare a ceditSimon Glass
Split out the code which prepares the cedit for use, so we can call it from a test. Add a log category while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25expo: Split out cedit into its own headerSimon Glass
Before adding more functions to this interface, create a new header for the configuration editor. Fix up the expo header guard while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14expo: Add a configuration editorSimon Glass
Add a new 'cedit' command which allows editing configuration using an expo. The configuration items appear as menus on the display. This is extremely basic, only supporting menus and not providing any way to load or save the configuration. Signed-off-by: Simon Glass <sjg@chromium.org>