123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- #include "ch.h"
- #include "hal.h"
- #include "irq_storm.h"
- static const GPTConfig gpt4cfg = {
- 1000000,
- irq_storm_gpt1_cb,
- 0,
- 0
- };
- static const GPTConfig gpt3cfg = {
- 1000000,
- irq_storm_gpt2_cb,
- 0,
- 0
- };
- static const irq_storm_config_t irq_storm_config = {
- (BaseSequentialStream *)&SD2,
- GPIOC,
- GPIOC_LED1,
- &GPTD4,
- &GPTD3,
- &gpt4cfg,
- &gpt3cfg,
- STM32_SYSCLK
- };
- int main(void) {
-
- halInit();
- chSysInit();
-
- sdStart(&SD2, NULL);
-
- irq_storm_execute(&irq_storm_config);
-
- while (true) {
- chThdSleepMilliseconds(5000);
- }
- }
|