bios/cmd_bios: Add buttons command to get buttons value.
This commit is contained in:
parent
8250f56f80
commit
47df2f6983
|
@ -139,6 +139,22 @@ define_command(flush_cpu_dcache, flush_cpu_dcache, "Flush CPU data cache", SYSTE
|
|||
define_command(flush_l2_cache, flush_l2_cache, "Flush L2 cache", SYSTEM_CMDS);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Command "buttons"
|
||||
*
|
||||
* Set Buttons value
|
||||
*
|
||||
*/
|
||||
#ifdef CSR_BUTTONS_BASE
|
||||
static void buttons_handler(int nb_params, char **params)
|
||||
{
|
||||
unsigned int value;
|
||||
value = buttons_in_read();
|
||||
printf("Buttons value: 0x%x", value);
|
||||
}
|
||||
define_command(buttons, buttons_handler, "Get Buttons value", SYSTEM_CMDS);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Command "leds"
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue