mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-05-02 14:16:28 -04:00
remove some
This commit is contained in:
parent
de51fa85af
commit
e104dbf251
1 changed files with 18 additions and 18 deletions
|
@ -30,23 +30,23 @@ static uint8_t rnd_byte(void)
|
||||||
// dump_memory
|
// dump_memory
|
||||||
// dump the complete contents of the memory
|
// dump the complete contents of the memory
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
void spi_dump_memory(void)
|
// void spi_dump_memory(void)
|
||||||
{
|
// {
|
||||||
flash_release_powerdown();
|
// flash_release_powerdown();
|
||||||
|
//
|
||||||
uint8_t rx_buf[4096] = {0x00};
|
// uint8_t rx_buf[4096] = {0x00};
|
||||||
|
//
|
||||||
for (int block = 0; block < 0x02; block += 1) {
|
// for (int block = 0; block < 0x02; block += 1) {
|
||||||
uint32_t address = 0x00000000;
|
// uint32_t address = 0x00000000;
|
||||||
address |= (block << ADDR_BYTE_3_BIT) & 0x00FF0000;
|
// address |= (block << ADDR_BYTE_3_BIT) & 0x00FF0000;
|
||||||
for (int i = 0; i < 16; i++) {
|
// for (int i = 0; i < 16; i++) {
|
||||||
memset(rx_buf, 0x00, sizeof(rx_buf));
|
// memset(rx_buf, 0x00, sizeof(rx_buf));
|
||||||
flash_read_data(address, rx_buf, sizeof(rx_buf));
|
// flash_read_data(address, rx_buf, sizeof(rx_buf));
|
||||||
write(rx_buf, sizeof(rx_buf));
|
// write(rx_buf, sizeof(rx_buf));
|
||||||
address += 4096;
|
// address += 4096;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
bool comp(uint8_t *a, uint8_t b, size_t size)
|
bool comp(uint8_t *a, uint8_t b, size_t size)
|
||||||
{
|
{
|
||||||
|
@ -165,7 +165,7 @@ int main(void)
|
||||||
// It this is reached, the read/writing is successful.
|
// It this is reached, the read/writing is successful.
|
||||||
// touch_wait(LED_GREEN, 0); // start dump
|
// touch_wait(LED_GREEN, 0); // start dump
|
||||||
set_led(LED_BLACK);
|
set_led(LED_BLACK);
|
||||||
spi_dump_memory();
|
// spi_dump_memory();
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
set_led(LED_GREEN);
|
set_led(LED_GREEN);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue