aboutsummaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/zpu/usrp2p/spi_flash.c5
-rw-r--r--firmware/zpu/usrp2p/udp_fw_update.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/firmware/zpu/usrp2p/spi_flash.c b/firmware/zpu/usrp2p/spi_flash.c
index 2033b8035..9406f8042 100644
--- a/firmware/zpu/usrp2p/spi_flash.c
+++ b/firmware/zpu/usrp2p/spi_flash.c
@@ -50,7 +50,7 @@ spi_flash_wait(void)
void
spi_flash_erase_sector_start(uint32_t flash_addr)
{
- //uprintf(UART_DEBUG, "spi_flash_erase_sector_start: addr = 0x%x\n", flash_addr);
+ //printf("spi_flash_erase_sector_start: addr = 0x%x\n", flash_addr);
if(flash_addr > spi_flash_memory_size())
return;
@@ -166,6 +166,9 @@ void
spi_flash_async_erase_start(spi_flash_async_state_t *s,
uint32_t flash_addr, size_t nbytes)
{
+
+ //printf("got command to erase %d bytes at 0x%x\n", nbytes, flash_addr);
+
if ((nbytes == 0) || ((flash_addr + nbytes) > spi_flash_memory_size())){
s->first = s->last = s->current = 0;
return;
diff --git a/firmware/zpu/usrp2p/udp_fw_update.c b/firmware/zpu/usrp2p/udp_fw_update.c
index 68105aab3..793011651 100644
--- a/firmware/zpu/usrp2p/udp_fw_update.c
+++ b/firmware/zpu/usrp2p/udp_fw_update.c
@@ -35,6 +35,8 @@ uint16_t get_hw_rev(void) {
return tmp;
}
+spi_flash_async_state_t spi_flash_async_state;
+
//Firmware update packet handler
void handle_udp_fw_update_packet(struct socket_address src, struct socket_address dst,
unsigned char *payload, int payload_len) {
@@ -60,8 +62,6 @@ void handle_udp_fw_update_packet(struct socket_address src, struct socket_addres
update_data_in_id = USRP2_FW_UPDATE_ID_WAT;
}
- spi_flash_async_state_t spi_flash_async_state;
-
switch(update_data_in_id) {
case USRP2_FW_UPDATE_ID_OHAI_LOL: //why hello there you handsome devil
update_data_out.id = USRP2_FW_UPDATE_ID_OHAI_OMG;