Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // STM32F407ZGT6
- // VSCode + Platformio
- HardwareTimer *MyTim;
- void UpdateLED(HardwareTimer *htim) {
- digitalWrite(LED_BUILTIN,!digitalRead(LED_BUILTIN));
- }
- // runs once on machine start
- void setup() {
- Serial.begin(57600);
- pinMode(LED_BUILTIN,OUTPUT);
- MyTim = new HardwareTimer(TIM1);
- MyTim->setOverflow(10,HERTZ_FORMAT);
- MyTim->attachInterrupt(UpdateLED);
- MyTim->resume();
- }
- void loop() {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement