WIP
This commit is contained in:
parent
c8941003bb
commit
f3c357db5e
4
.vscode/tasks.json
vendored
4
.vscode/tasks.json
vendored
@ -2,9 +2,9 @@
|
|||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"options": {
|
"options": {
|
||||||
"env": {
|
"env": {
|
||||||
"APPLICATION": "blinky",
|
// "APPLICATION": "button",
|
||||||
// "APPLICATION": "spi",
|
// "APPLICATION": "spi",
|
||||||
// "APPLICATION": "st7789_lcd",
|
"APPLICATION": "st7789_lcd",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"presentation": {
|
"presentation": {
|
||||||
|
2
Makefile
2
Makefile
@ -84,7 +84,7 @@ check: $(C_SRCS)
|
|||||||
$(TARGET): $(OBJS) $(THIS_MAKEFILE)
|
$(TARGET): $(OBJS) $(THIS_MAKEFILE)
|
||||||
@mkdir -p $(dir $@)
|
@mkdir -p $(dir $@)
|
||||||
$(CXX) $(CXX_FLAGS) $(LD_FLAGS) $(OBJS) $(addprefix -l,$(LIBS)) -Wl,-Map=$@.map -o $@
|
$(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
|
ln -sf $(shell pwd)/$@ $(shell pwd)/bin/firmware.elf
|
||||||
$(SIZE) -x $@ > $@.size
|
$(SIZE) -x $@ > $@.size
|
||||||
@cat $@.size
|
@cat $@.size
|
||||||
|
@ -66,6 +66,9 @@ int main(void)
|
|||||||
led->toggle();
|
led->toggle();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
__SEV();
|
||||||
|
__WFE();
|
||||||
|
__WFE();
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#include "platform/cm4/InterruptGuardian.h"
|
#include "platform/cm4/InterruptGuardian.h"
|
||||||
|
|
||||||
#include "platform/nrf52/gpio.h"
|
#include "platform/nrf52/gpio.h"
|
||||||
|
#include "platform/nrf52/gpiote.h"
|
||||||
#include "platform/nrf52/spi.h"
|
#include "platform/nrf52/spi.h"
|
||||||
#include "platform/nrf52/InterruptHandler.h"
|
#include "platform/nrf52/InterruptHandler.h"
|
||||||
#include "platform/nrf52/InterruptGuardian.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;
|
cm4::InterruptGuardian cm4::InterruptGuardian::instance;
|
||||||
nrf52::InterruptGuardian nrf52::InterruptGuardian::instance;
|
nrf52::InterruptGuardian nrf52::InterruptGuardian::instance;
|
||||||
|
|
||||||
|
// GPIO events
|
||||||
|
nrf52::Gpiote gpiote;
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
cm4::InterruptGuardian::enable_interrupts();
|
cm4::InterruptGuardian::enable_interrupts();
|
||||||
|
@ -6,6 +6,10 @@ extern "C" {
|
|||||||
NRF_GPIOTE_Type *const GPIOTE_REGS = reinterpret_cast<NRF_GPIOTE_Type *>(NRF_GPIOTE_BASE);
|
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/gpiote.h"
|
||||||
#include "platform/nrf52/gpio.h"
|
#include "platform/nrf52/gpio.h"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user