Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Very simple blink function which will
- * blink an LED on the Nucleo board.
- */
- #include <stdint.h>
- #include <loc3util/stm32/pins.h>
- #include <loc3util/stm32/clock.h>
- int
- main( void )
- {
- /* set up the max clock for F411 using HSI */
- clock_setup(96000000, 0);
- /* make PC0, PC1, PB0, and PA4 output pins */
- pin_output(PC0, PC1, PB0, PA4, PXX);
- /* Set two of them to the 'high' state */
- pin_set(PC1, PA4, PXX);
- while (1) {
- /* alternately blink them */
- pin_toggle(PC0, PC1, PB0, PA4, PXX);
- msleep(100);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement