USB Device - Joystick/Mouse  1.0
Macros | Functions | Variables
hal.h File Reference
#include "stm32f4xx.h"
#include "stm32f4xx_conf.h"

Go to the source code of this file.

Macros

#define ARM_HW_TIMER_TIMx   (TIM3)
 
#define ARM_HW_TIMER_TIMx_IRQ   (TIM3_IRQn)
 
#define ARM_HW_TIMER_TIMx_RCC   (RCC_APB1Periph_TIM3)
 
#define ARM_HW_TIMER_TIMx_IRQHandler   (TIM3_IRQHandler)
 
#define TRUE   (0xFF)
 
#define FALSE   (0x00)
 
#define NULL   (0x00)
 
#define USB_AF   ()
 
#define USB_ID_PORT   (GPIOA)
 
#define USB_ID_PIN   (GPIO_PinSource10)
 
#define USB_DP_PORT   (GPIOA)
 
#define USB_DP_PIN   (GPIO_PinSource12)
 
#define USB_DM_PORT   (GPIOA)
 
#define USB_DM_PIN   (GPIO_PinSource11)
 
#define USB_FS_PORT   (GPIOA)
 
#define USB_FS_PIN   (GPIO_PinSource9)
 
#define USB_PSO_PORT   (GPIOH)
 
#define USB_PSO_PIN   (GPIO_PinSource5)
 
#define USB_GPIO_CLK   (RCC_AHB2Periph_OTG_FS)
 
#define USB_ALTERNATE_FNC   (GPIO_AF_OTG1_FS)
 
#define USB_OTG_FULL_SPEED   (3)
 
#define DCFG_FRAME_INTERVAL   (0)
 
#define USB_NUM_EP   (4)
 
#define MAX_EPS   (15)
 
#define RX0_FIFO_SIZE   128
 
#define TX0_FIFO_SIZE   64
 
#define TX1_FIFO_SIZE   128
 
#define TX2_FIFO_SIZE   0
 
#define TX3_FIFO_SIZE   0
 
#define COMn   (1)
 
#define COM0_VALIDITY   (true)
 
#define COM0_USART   (USART3)
 
#define COM0_USART_CLK   (RCC_APB1Periph_USART3)
 
#define COM0_USART_IRQHandler   (USART3_IRQHandler)
 
#define COM0_USART_IRQ   (USART3_IRQn)
 
#define COM0_USART_RX_GPIO_CLK   (RCC_AHB1Periph_GPIOC)
 
#define COM0_USART_TX_GPIO_CLK   (RCC_AHB1Periph_GPIOC)
 
#define COM0_USART_RX_GPIO_PORT   (GPIOC)
 
#define COM0_USART_TX_GPIO_PORT   (GPIOC)
 
#define COM0_USART_RX_PIN_SRC   (GPIO_PinSource11)
 
#define COM0_USART_TX_PIN_SRC   (GPIO_PinSource10)
 
#define COM0_USART_FC_RTS_GPIO_CLK   (0)
 
#define COM0_USART_FC_CTS_GPIO_CLK   (0)
 
#define COM0_USART_FC_RTS_GPIO_PORT   (0)
 
#define COM0_USART_FC_CTS_GPIO_PORT   (0)
 
#define COM0_USART_FC_RTS_PIN_SRC   (0)
 
#define COM0_USART_FC_CTS_PIN_SRC   (0)
 
#define COM0_USART_PIN_AF   (GPIO_AF_USART3)
 
#define COM0_RS485_DIR_GPIO   (0)
 
#define COM0_RS485_DIR_PIN_SRC   (0)
 
#define COM0_RS485_DIR_PIN_INVERT   (false)
 
#define COM0_RS485_DIR_TX_DELAY   (0)
 
#define COM0_RS485_BLOCK_RX_BY_TX   (false)
 
#define COM0_SEND_BYTES_ECHO   (false)
 
#define LOG_COM_PORT   (0)
 
#define LOG_COM_BR   (115200)
 
#define LOG_COM_PARITY   (0)
 
#define LEDn   (4)
 
#define LED0_PIN   (GPIO_Pin_8)
 
#define LED0_GPIO_PORT   (GPIOG)
 
#define LED0_GPIO_PUPD   (GPIO_PuPd_UP)
 
#define LED0_GPIO_OTYPE   (GPIO_OType_PP)
 
#define LED0_INVERT   (TRUE)
 
#define LED1_PIN   (GPIO_Pin_6)
 
#define LED1_GPIO_PORT   (GPIOG)
 
#define LED1_GPIO_PUPD   (GPIO_PuPd_UP)
 
#define LED1_GPIO_OTYPE   (GPIO_OType_PP)
 
#define LED1_INVERT   (TRUE)
 
#define LED2_PIN   (GPIO_Pin_7)
 
#define LED2_GPIO_PORT   (GPIOC )
 
#define LED2_GPIO_PUPD   (GPIO_PuPd_UP)
 
#define LED2_GPIO_OTYPE   (GPIO_OType_PP)
 
#define LED2_INVERT   (TRUE)
 
#define LED3_PIN   (GPIO_Pin_9)
 
#define LED3_GPIO_PORT   (GPIOI)
 
#define LED3_GPIO_PUPD   (GPIO_PuPd_UP)
 
#define LED3_GPIO_OTYPE   (GPIO_OType_PP)
 
#define LED3_INVERT   (TRUE)
 
#define BUTTONn   (2)
 
#define BUTTON0_PIN   (GPIO_Pin_15)
 
#define BUTTON0_GPIO_PORT   (GPIOG)
 
#define BUTTON0_GPIO_PUPD   (GPIO_PuPd_UP)
 
#define BUTTON0_EXTI_LINE   (EXTI_Line15)
 
#define BUTTON0_EXTI_PORT_SOURCE   (EXTI_PortSourceGPIOG)
 
#define BUTTON0_EXTI_PIN_SOURCE   (EXTI_PinSource15)
 
#define BUTTON0_EXTI_IRQn   (EXTI15_10_IRQn)
 
#define BUTTON0_INVERT   (true)
 
#define BUTTON1_PIN   (GPIO_Pin_13)
 
#define BUTTON1_GPIO_PORT   (GPIOC)
 
#define BUTTON1_GPIO_PUPD   (GPIO_PuPd_UP)
 
#define BUTTON1_EXTI_LINE   (EXTI_Line13)
 
#define BUTTON1_EXTI_PORT_SOURCE   (EXTI_PortSourceGPIOC)
 
#define BUTTON1_EXTI_PIN_SOURCE   (EXTI_PinSource13)
 
#define BUTTON1_EXTI_IRQn   (EXTI15_10_IRQn)
 
#define BUTTON1_INVERT   (true)
 

Functions

uint32_t getGPIO_AHB1_Clk (GPIO_TypeDef *gpio)
 
uint32_t getGPIO_AHB1_Clk (uint32_t gpio)
 
uint32_t getGPIO_EXTI_PortSource (GPIO_TypeDef *gpio)
 
uint32_t getGPIO_EXTI_PortSource (uint32_t gpio)
 
void initClockTree ()
 

Variables

const bool COMn_VALIDITY [COMn]
 
const uint32_t COMn_USART [COMn]
 
const uint32_t COMn_USART_CLK [COMn]
 
const IRQn COMn_USART_IRQ [COMn]
 
const uint32_t COMn_USART_RX_GPIO_CLK [COMn]
 
const uint32_t COMn_USART_TX_GPIO_CLK [COMn]
 
const uint32_t COMn_USART_RX_GPIO_PORT [COMn]
 
const uint32_t COMn_USART_TX_GPIO_PORT [COMn]
 
const uint8_t COMn_USART_TX_PIN_SRC [COMn]
 
const uint8_t COMn_USART_RX_PIN_SRC [COMn]
 
const uint32_t COMn_USART_FC_RTS_GPIO_CLK [COMn]
 
const uint32_t COMn_USART_FC_CTS_GPIO_CLK [COMn]
 
const uint32_t COMn_USART_FC_RTS_GPIO_PORT [COMn]
 
const uint32_t COMn_USART_FC_CTS_GPIO_PORT [COMn]
 
const uint8_t COMn_USART_FC_RTS_PIN_SRC [COMn]
 
const uint8_t COMn_USART_FC_CTS_PIN_SRC [COMn]
 
const uint8_t COMn_USART_PIN_AF [COMn]
 
const uint32_t COMn_RS485_DIR_GPIO_C [COMn]
 
const uint8_t COMn_RS485_DIR_PIN_SRC_C [COMn]
 
const uint32_t COMn_RS485_DIR_GPIO_D [COMn]
 
const uint8_t COMn_RS485_DIR_PIN_SRC_D [COMn]
 
uint32_t COMn_RS485_DIR_GPIO [COMn]
 
uint8_t COMn_RS485_DIR_PIN_SRC [COMn]
 
const bool COMn_RS485_DIR_PIN_INVERT [COMn]
 
const uint32_t COMn_RS485_DIR_TX_DELAY [COMn]
 
const bool COMn_RS485_BLOCK_RX_BY_TX [COMn]
 
const bool COMn_SEND_BYTES_ECHO [COMn]
 
const uint32_t LED_GPIO_PORT [LEDn]
 
const uint16_t LED_GPIO_PIN [LEDn]
 
const GPIOPuPd_TypeDef LED_GPIO_PUPD [LEDn]
 
const GPIOOType_TypeDef LED_GPIO_OTYPE [LEDn]
 
const uint8_t LED_INVERT_ON_OFF [LEDn]
 
const uint32_t BUTTONn_PORT [BUTTONn]
 
const uint16_t BUTTONn_PIN [BUTTONn]
 
const GPIOPuPd_TypeDef BUTTONn_PUPD [BUTTONn]
 
const uint16_t BUTTONn_EXTI_LINE [BUTTONn]
 
const uint8_t BUTTONn_PIN_SOURCE [BUTTONn]
 
const IRQn BUTTONn_IRQn [BUTTONn]
 
const bool BUTTONn_INVERT_ON_OFF [BUTTONn]
 

Macro Definition Documentation

#define ARM_HW_TIMER_TIMx   (TIM3)
#define ARM_HW_TIMER_TIMx_IRQ   (TIM3_IRQn)
#define ARM_HW_TIMER_TIMx_IRQHandler   (TIM3_IRQHandler)
#define ARM_HW_TIMER_TIMx_RCC   (RCC_APB1Periph_TIM3)
#define BUTTON0_EXTI_IRQn   (EXTI15_10_IRQn)
#define BUTTON0_EXTI_LINE   (EXTI_Line15)
#define BUTTON0_EXTI_PIN_SOURCE   (EXTI_PinSource15)
#define BUTTON0_EXTI_PORT_SOURCE   (EXTI_PortSourceGPIOG)
#define BUTTON0_GPIO_PORT   (GPIOG)
#define BUTTON0_GPIO_PUPD   (GPIO_PuPd_UP)
#define BUTTON0_INVERT   (true)
#define BUTTON0_PIN   (GPIO_Pin_15)
#define BUTTON1_EXTI_IRQn   (EXTI15_10_IRQn)
#define BUTTON1_EXTI_LINE   (EXTI_Line13)
#define BUTTON1_EXTI_PIN_SOURCE   (EXTI_PinSource13)
#define BUTTON1_EXTI_PORT_SOURCE   (EXTI_PortSourceGPIOC)
#define BUTTON1_GPIO_PORT   (GPIOC)
#define BUTTON1_GPIO_PUPD   (GPIO_PuPd_UP)
#define BUTTON1_INVERT   (true)
#define BUTTON1_PIN   (GPIO_Pin_13)
#define BUTTONn   (2)
#define COM0_RS485_BLOCK_RX_BY_TX   (false)
#define COM0_RS485_DIR_GPIO   (0)
#define COM0_RS485_DIR_PIN_INVERT   (false)
#define COM0_RS485_DIR_PIN_SRC   (0)
#define COM0_RS485_DIR_TX_DELAY   (0)
#define COM0_SEND_BYTES_ECHO   (false)
#define COM0_USART   (USART3)
#define COM0_USART_CLK   (RCC_APB1Periph_USART3)
#define COM0_USART_FC_CTS_GPIO_CLK   (0)
#define COM0_USART_FC_CTS_GPIO_PORT   (0)
#define COM0_USART_FC_CTS_PIN_SRC   (0)
#define COM0_USART_FC_RTS_GPIO_CLK   (0)
#define COM0_USART_FC_RTS_GPIO_PORT   (0)
#define COM0_USART_FC_RTS_PIN_SRC   (0)
#define COM0_USART_IRQ   (USART3_IRQn)
#define COM0_USART_IRQHandler   (USART3_IRQHandler)
#define COM0_USART_PIN_AF   (GPIO_AF_USART3)
#define COM0_USART_RX_GPIO_CLK   (RCC_AHB1Periph_GPIOC)
#define COM0_USART_RX_GPIO_PORT   (GPIOC)
#define COM0_USART_RX_PIN_SRC   (GPIO_PinSource11)
#define COM0_USART_TX_GPIO_CLK   (RCC_AHB1Periph_GPIOC)
#define COM0_USART_TX_GPIO_PORT   (GPIOC)
#define COM0_USART_TX_PIN_SRC   (GPIO_PinSource10)
#define COM0_VALIDITY   (true)
#define COMn   (1)
#define DCFG_FRAME_INTERVAL   (0)
#define FALSE   (0x00)
#define LED0_GPIO_OTYPE   (GPIO_OType_PP)
#define LED0_GPIO_PORT   (GPIOG)
#define LED0_GPIO_PUPD   (GPIO_PuPd_UP)
#define LED0_INVERT   (TRUE)
#define LED0_PIN   (GPIO_Pin_8)
#define LED1_GPIO_OTYPE   (GPIO_OType_PP)
#define LED1_GPIO_PORT   (GPIOG)
#define LED1_GPIO_PUPD   (GPIO_PuPd_UP)
#define LED1_INVERT   (TRUE)
#define LED1_PIN   (GPIO_Pin_6)
#define LED2_GPIO_OTYPE   (GPIO_OType_PP)
#define LED2_GPIO_PORT   (GPIOC )
#define LED2_GPIO_PUPD   (GPIO_PuPd_UP)
#define LED2_INVERT   (TRUE)
#define LED2_PIN   (GPIO_Pin_7)
#define LED3_GPIO_OTYPE   (GPIO_OType_PP)
#define LED3_GPIO_PORT   (GPIOI)
#define LED3_GPIO_PUPD   (GPIO_PuPd_UP)
#define LED3_INVERT   (TRUE)
#define LED3_PIN   (GPIO_Pin_9)
#define LEDn   (4)
#define LOG_COM_BR   (115200)
#define LOG_COM_PARITY   (0)
#define LOG_COM_PORT   (0)
#define MAX_EPS   (15)
#define NULL   (0x00)
#define RX0_FIFO_SIZE   128
#define TRUE   (0xFF)
#define TX0_FIFO_SIZE   64
#define TX1_FIFO_SIZE   128
#define TX2_FIFO_SIZE   0
#define TX3_FIFO_SIZE   0
#define USB_AF   ()
#define USB_ALTERNATE_FNC   (GPIO_AF_OTG1_FS)
#define USB_DM_PIN   (GPIO_PinSource11)
#define USB_DM_PORT   (GPIOA)
#define USB_DP_PIN   (GPIO_PinSource12)
#define USB_DP_PORT   (GPIOA)
#define USB_FS_PIN   (GPIO_PinSource9)
#define USB_FS_PORT   (GPIOA)
#define USB_GPIO_CLK   (RCC_AHB2Periph_OTG_FS)
#define USB_ID_PIN   (GPIO_PinSource10)
#define USB_ID_PORT   (GPIOA)
#define USB_NUM_EP   (4)
#define USB_OTG_FULL_SPEED   (3)
#define USB_PSO_PIN   (GPIO_PinSource5)
#define USB_PSO_PORT   (GPIOH)

Function Documentation

uint32_t getGPIO_AHB1_Clk ( GPIO_TypeDef *  gpio)
uint32_t getGPIO_AHB1_Clk ( uint32_t  gpio)
uint32_t getGPIO_EXTI_PortSource ( GPIO_TypeDef *  gpio)
uint32_t getGPIO_EXTI_PortSource ( uint32_t  gpio)
void initClockTree ( )

Variable Documentation

const uint16_t BUTTONn_EXTI_LINE[BUTTONn]
const bool BUTTONn_INVERT_ON_OFF[BUTTONn]
const IRQn BUTTONn_IRQn[BUTTONn]
const uint16_t BUTTONn_PIN[BUTTONn]
const uint8_t BUTTONn_PIN_SOURCE[BUTTONn]
const uint32_t BUTTONn_PORT[BUTTONn]
const GPIOPuPd_TypeDef BUTTONn_PUPD[BUTTONn]
const bool COMn_RS485_BLOCK_RX_BY_TX[COMn]
uint32_t COMn_RS485_DIR_GPIO[COMn]
const uint32_t COMn_RS485_DIR_GPIO_C[COMn]
const uint32_t COMn_RS485_DIR_GPIO_D[COMn]
const bool COMn_RS485_DIR_PIN_INVERT[COMn]
uint8_t COMn_RS485_DIR_PIN_SRC[COMn]
const uint8_t COMn_RS485_DIR_PIN_SRC_C[COMn]
const uint8_t COMn_RS485_DIR_PIN_SRC_D[COMn]
const uint32_t COMn_RS485_DIR_TX_DELAY[COMn]
const bool COMn_SEND_BYTES_ECHO[COMn]
const uint32_t COMn_USART[COMn]
const uint32_t COMn_USART_CLK[COMn]
const uint32_t COMn_USART_FC_CTS_GPIO_CLK[COMn]
const uint32_t COMn_USART_FC_CTS_GPIO_PORT[COMn]
const uint8_t COMn_USART_FC_CTS_PIN_SRC[COMn]
const uint32_t COMn_USART_FC_RTS_GPIO_CLK[COMn]
const uint32_t COMn_USART_FC_RTS_GPIO_PORT[COMn]
const uint8_t COMn_USART_FC_RTS_PIN_SRC[COMn]
const IRQn COMn_USART_IRQ[COMn]
const uint8_t COMn_USART_PIN_AF[COMn]
const uint32_t COMn_USART_RX_GPIO_CLK[COMn]
const uint32_t COMn_USART_RX_GPIO_PORT[COMn]
const uint8_t COMn_USART_RX_PIN_SRC[COMn]
const uint32_t COMn_USART_TX_GPIO_CLK[COMn]
const uint32_t COMn_USART_TX_GPIO_PORT[COMn]
const uint8_t COMn_USART_TX_PIN_SRC[COMn]
const bool COMn_VALIDITY[COMn]
const GPIOOType_TypeDef LED_GPIO_OTYPE[LEDn]
const uint16_t LED_GPIO_PIN[LEDn]
const uint32_t LED_GPIO_PORT[LEDn]
const GPIOPuPd_TypeDef LED_GPIO_PUPD[LEDn]
const uint8_t LED_INVERT_ON_OFF[LEDn]