summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJoey Castillo <joeycastillo@utexas.edu>2022-01-27 09:17:58 -0500
committerJoey Castillo <joeycastillo@utexas.edu>2022-01-27 09:17:58 -0500
commit5e4dc9ae5103ecec068c4e3fc4baec3d76bd05a4 (patch)
treeaa1a12407a825356273376da11a160ca75ab328c /apps
parent523a5d2f0b3f0d79b16784470870935313dd5775 (diff)
downloadSensor-Watch-5e4dc9ae5103ecec068c4e3fc4baec3d76bd05a4.tar.gz
Sensor-Watch-5e4dc9ae5103ecec068c4e3fc4baec3d76bd05a4.tar.bz2
Sensor-Watch-5e4dc9ae5103ecec068c4e3fc4baec3d76bd05a4.zip
fix spi test
Diffstat (limited to 'apps')
-rw-r--r--apps/spi-test/app.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/apps/spi-test/app.c b/apps/spi-test/app.c
index 2ce2c1f7..b2ed436f 100644
--- a/apps/spi-test/app.c
+++ b/apps/spi-test/app.c
@@ -10,12 +10,9 @@ void app_init(void) {
spi_flash_init();
uint8_t buf[3] = {1, 2, 3};
- flash_enable();
spi_flash_command(CMD_ENABLE_WRITE);
- // note that you will need to erase the sector to write different values later:
- // spi_flash_sector_command(CMD_SECTOR_ERASE, 0);
+ // note that you will need to erase the sector to write different values later
spi_flash_write_data(0, buf, 3);
- flash_disable();
}
void app_wake_from_backup(void) {
@@ -34,11 +31,9 @@ void app_wake_from_standby(void) {
bool app_loop(void) {
uint8_t buf[3] = {0};
- flash_enable();
// should print 1, 2, 3
spi_flash_read_data(0, buf, 3);
printf("data: %x, %x, %x\n", buf[0], buf[1], buf[2]);
- flash_disable();
delay_ms(100);