38 lines
690 B
C
38 lines
690 B
C
#ifndef _PINS_H_
|
|
#define _PINS_H_
|
|
#include <ch32v20x.h>
|
|
|
|
#ifdef CH32V203
|
|
//Pins Shift Register
|
|
#define PORT_SR GPIOA
|
|
#define SR_SER GPIO_Pin_5
|
|
#define SR_RCK GPIO_Pin_6
|
|
#define SR_BSS GPIO_Pin_7
|
|
|
|
//Pins 74154 Binary Decoder (for Rows)
|
|
#define PORT_BD GPIOB
|
|
#define BD_OE GPIO_Pin_5
|
|
#define BD_B0 GPIO_Pin_9
|
|
#define BD_B1 GPIO_Pin_8
|
|
#define BD_B2 GPIO_Pin_7
|
|
#define BD_B3 GPIO_Pin_6
|
|
|
|
//Buzzer Pin
|
|
#define PORT_BUZ GPIOA
|
|
#define BUZ_PIN GPIO_Pin_15
|
|
|
|
//Button Pins
|
|
//Up Down ADC
|
|
#define PORT_ADC GPIOB
|
|
#define ADC_UD GPIO_Pin_1
|
|
//Left Right ADC
|
|
#define ADC_LR GPIO_Pin_0
|
|
|
|
#define PORT_AB_BUTTONS GPIOB
|
|
//A button
|
|
#define BUT_A GPIO_Pin_4
|
|
//B button
|
|
#define BUT_B GPIO_Pin_3
|
|
#endif
|
|
|
|
#endif |