Basic vanilla C boilerplate for STM32L100xC (Discovery L100C). Uses GCC. This was some class project without much practical use
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
407 B

9 years ago
#include <common.h>
#include "utils/usart.h"
#include "utils/timebase.h"
9 years ago
#include "init.h"
9 years ago
9 years ago
void blink(void) {
GPIOC_ODR ^= BIT9;
9 years ago
}
/** Called before main() */
void SystemInit(void)
{
init_clock();
init_systick();
9 years ago
init_gpios();
init_usart();
schedule_timed_task(blink, 500);
9 years ago
}
int main(void)
{
while (1) {
delay_ms(1000);
9 years ago
GPIOC_ODR ^= BIT8;
9 years ago
usart_tx_string(USART3, "HELLO\r\n");
9 years ago
}
}