1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #pragma once
- #ifndef _BOARD_H
- #define _BOARD_H
- /* Includes */
- #include "main.h"
- #include "gpio.h"
- #include "xprintf.h"
- /* Type Defs */
- /* Exported macros */
- #define LED_ON() GPIO_PIN_SET(GPIOB, GPIO_PIN_0)
- #define LED_OFF() GPIO_PIN_RES(GPIOB, GPIO_PIN_0)
- /* Constants */
- /* PWM Timers for 50 Hz */
- #define TIM1_PSC (24 - 1)
- #define TIM1_ARR (20000 - 1)
- #define SERVO_INIT_VAL 1000
- #define SERVO_OPEN_VAL 2000
- #define TIM3_PSC (24000 - 1)
- #define TIM3_ARR (100 - 1)
- /* Defines */
- #define Photo_Pin GPIO_PIN_7
- #define Photo_Port GPIOB
- #define Servo_2_Pin GPIO_PIN_8
- #define Servo_2_Port GPIOA
- #define Servo_1_Pin GPIO_PIN_11
- #define Servo_1_Port GPIOA
- /* Variables */
- /* Exported funcions */
- void SystemClock_Config(void);
- void Board_Init(void);
- void delay_ms(uint32_t msek);
- void SysTick_Handler(void);
- #endif /* _BPARD_H */
|