miniFOC
1.0.3
This open-source project aims to accomplish a FOC(Field Oriented Control) scheme that is operatable with minimum costs in China.
hardware
led.h
Go to the documentation of this file.
1
/**************************************************************************/
9
#ifndef MINIFOC_HARDWARE_LED_H_
10
#define MINIFOC_HARDWARE_LED_H_
11
15
#define led_on() gpio_bit_reset(GPIOB, GPIO_PIN_5)
16
20
#define led_off() gpio_bit_set(GPIOB, GPIO_PIN_5)
21
25
#define led_toggle() gpio_bit_write(GPIOB, GPIO_PIN_5, !gpio_output_bit_get(GPIOB, GPIO_PIN_5))
26
30
#define led_config() rcu_periph_clock_enable(RCU_GPIOB);\
31
gpio_mode_set(GPIOB, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO_PIN_5);\
32
gpio_output_options_set(GPIOB, GPIO_OTYPE_PP, GPIO_OSPEED_50MHZ, GPIO_PIN_5);\
33
led_off()
34
35
#endif
// MINIFOC_HARDWARE_LED_H_
Generated by
1.9.4