This commit is contained in:
Thomas Klaehn 2021-11-20 08:14:38 +01:00
parent c8941003bb
commit f3c357db5e
5 changed files with 14 additions and 3 deletions

4
.vscode/tasks.json vendored
View File

@ -2,9 +2,9 @@
"version": "2.0.0",
"options": {
"env": {
"APPLICATION": "blinky",
// "APPLICATION": "button",
// "APPLICATION": "spi",
// "APPLICATION": "st7789_lcd",
"APPLICATION": "st7789_lcd",
},
},
"presentation": {

View File

@ -84,7 +84,7 @@ check: $(C_SRCS)
$(TARGET): $(OBJS) $(THIS_MAKEFILE)
@mkdir -p $(dir $@)
$(CXX) $(CXX_FLAGS) $(LD_FLAGS) $(OBJS) $(addprefix -l,$(LIBS)) -Wl,-Map=$@.map -o $@
$(OBJDUMP) --disassemble-all --section=.text --source -EL -C --wide --line-numbers --inlines $@ > $@.text.disassemble
# $(OBJDUMP) --disassemble-all --section=.text --source -EL -C --wide --line-numbers --inlines $@ > $@.text.disassemble
ln -sf $(shell pwd)/$@ $(shell pwd)/bin/firmware.elf
$(SIZE) -x $@ > $@.size
@cat $@.size

View File

@ -66,6 +66,9 @@ int main(void)
led->toggle();
}
}
__SEV();
__WFE();
__WFE();
}
return 0;
}

View File

@ -2,6 +2,7 @@
#include "platform/cm4/InterruptGuardian.h"
#include "platform/nrf52/gpio.h"
#include "platform/nrf52/gpiote.h"
#include "platform/nrf52/spi.h"
#include "platform/nrf52/InterruptHandler.h"
#include "platform/nrf52/InterruptGuardian.h"
@ -22,6 +23,9 @@ St7789 lcd(lcd_spi, lcd_reset, lcd_data_command, lcd_backlight);
cm4::InterruptGuardian cm4::InterruptGuardian::instance;
nrf52::InterruptGuardian nrf52::InterruptGuardian::instance;
// GPIO events
nrf52::Gpiote gpiote;
int main(void)
{
cm4::InterruptGuardian::enable_interrupts();

View File

@ -6,6 +6,10 @@ extern "C" {
NRF_GPIOTE_Type *const GPIOTE_REGS = reinterpret_cast<NRF_GPIOTE_Type *>(NRF_GPIOTE_BASE);
}
#include "gpiote.h"
extern pinetime::platform::nrf52::Gpiote gpiote;
#include "platform/nrf52/gpiote.h"
#include "platform/nrf52/gpio.h"