fix typo and add helper to main loop
This commit is contained in:
parent
ee9b377698
commit
d1415c6283
@ -163,6 +163,12 @@ usbMsgLen_t usbFunctionSetup(uchar data[8])
|
|||||||
}
|
}
|
||||||
sram_bulk_write_start(req_addr);
|
sram_bulk_write_start(req_addr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (!shared_memory_scratchpad_region_save_helper(req_addr)){
|
||||||
|
sram_bulk_write_start(req_addr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (req_addr && (req_addr % req_bank_size) == 0) {
|
if (req_addr && (req_addr % req_bank_size) == 0) {
|
||||||
#ifdef FLT_DEBUG
|
#ifdef FLT_DEBUG
|
||||||
debug(DEBUG_USB,
|
debug(DEBUG_USB,
|
||||||
|
|||||||
@ -45,14 +45,18 @@ uint8_t scratchpad_locked_rx = 1;
|
|||||||
uint8_t scratchpad_locked_tx = 1;
|
uint8_t scratchpad_locked_tx = 1;
|
||||||
|
|
||||||
|
|
||||||
void shared_memory_scratchpad_region_saye_helper(uint32_t addr){
|
uint8_t shared_memory_scratchpad_region_save_helper(uint32_t addr){
|
||||||
|
|
||||||
if(addr > (SHARED_MEM_TX_LOC_STATE + SHARED_MEM_TX_LOC_SIZE ))
|
if(addr > (SHARED_MEM_TX_LOC_STATE + SHARED_MEM_TX_LOC_SIZE )){
|
||||||
shared_memory_scratchpad_region_tx_save();
|
shared_memory_scratchpad_region_tx_save();
|
||||||
|
return 0;
|
||||||
if(addr > (SHARED_MEM_RX_LOC_STATE + SHARED_MEM_RX_LOC_SIZE ))
|
}
|
||||||
|
if(addr > (SHARED_MEM_RX_LOC_STATE + SHARED_MEM_RX_LOC_SIZE )){
|
||||||
shared_memory_scratchpad_region_rx_save();
|
shared_memory_scratchpad_region_rx_save();
|
||||||
}
|
return 0;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void shared_memory_scratchpad_region_tx_save()
|
void shared_memory_scratchpad_region_tx_save()
|
||||||
|
|||||||
@ -62,7 +62,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void shared_memory_scratchpad_region_saye_helper(uint32_t addr);
|
uint8_t shared_memory_scratchpad_region_save_helper(uint32_t addr);
|
||||||
void shared_memory_scratchpad_region_tx_save();
|
void shared_memory_scratchpad_region_tx_save();
|
||||||
void shared_memory_scratchpad_region_tx_restore();
|
void shared_memory_scratchpad_region_tx_restore();
|
||||||
void shared_memory_scratchpad_region_rx_save();
|
void shared_memory_scratchpad_region_rx_save();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user