~ruther/stm32h747i-disco-usb-image-viewer

ref: 079ff751c0e9b65d936aa656e697257faebbb871 stm32h747i-disco-usb-image-viewer/src/delay.c -rw-r--r-- 304 bytes
079ff751 — Rutherther feat: implement cdc application layer, fix enumeration 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "delay.h"
#include <stm32h7xx.h>

uint32_t us_ticks;

void systick_configure() {
  SysTick->LOAD = SYSTICK_LOAD;
  SysTick->VAL = 0;
  SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | SysTick_CTRL_ENABLE_Msk; //| SysTick_CTRL_TICKINT_Msk;
  us_ticks = 0;
}

void systick_handler() {
  us_ticks++;
}
Do not follow this link