add reset handler
This commit is contained in:
16
src/device.c
16
src/device.c
@@ -733,3 +733,19 @@ uint8_t pubDeviceType()
|
||||
return DEVICE_TYPE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void reset (device_specs_t* specs, device_public_context_t* devInfo)
|
||||
{
|
||||
for(size_t i = 0; i < specs->memSpecsCount; i++)
|
||||
{
|
||||
const memseg_spec_t* spec = specs->memSpecs[i];
|
||||
for(size_t j = 0; j < spec->len; j++)
|
||||
{
|
||||
((uint8_t*)devInfo->deviceMem->cells[i])[j] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
devInfo->deviceMem->memwriteLen = 0;
|
||||
devInfo->deviceMem->memreadLen = 0;
|
||||
}
|
||||
Reference in New Issue
Block a user