mirror of
https://github.com/Polprzewodnikowy/SummerCart64.git
synced 2024-11-21 21:49:15 +01:00
return previous cfg when setting new
This commit is contained in:
parent
4c7783f740
commit
db97dd31fb
@ -355,6 +355,7 @@ void cfg_init (void) {
|
||||
void cfg_process (void) {
|
||||
uint32_t reg;
|
||||
uint32_t args[2];
|
||||
uint32_t prev_cfg[2];
|
||||
usb_tx_info_t packet_info;
|
||||
|
||||
reg = fpga_reg_get(REG_CFG_CMD);
|
||||
@ -377,10 +378,13 @@ void cfg_process (void) {
|
||||
break;
|
||||
|
||||
case 'C':
|
||||
prev_cfg[0] = args[0];
|
||||
cfg_query(prev_cfg);
|
||||
if (cfg_update(args)) {
|
||||
cfg_set_error(CFG_ERROR_BAD_CONFIG_ID);
|
||||
return;
|
||||
}
|
||||
args[1] = prev_cfg[1];
|
||||
break;
|
||||
|
||||
case 't':
|
||||
|
Loading…
Reference in New Issue
Block a user