期末大作业-增加矩阵键盘
This commit is contained in:
		
							parent
							
								
									cc80d09aeb
								
							
						
					
					
						commit
						618ae827f1
					
				
							
								
								
									
										22
									
								
								FinalHomework/Core/Inc/MatrixKey.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								FinalHomework/Core/Inc/MatrixKey.h
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,22 @@
 | 
				
			|||||||
 | 
					#ifndef __MATRIXKEY_H
 | 
				
			||||||
 | 
					#define __MATRIXKEY_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include<stdint.h>
 | 
				
			||||||
 | 
					enum {State0=0, State1, State2};
 | 
				
			||||||
 | 
					#define NO_KEY 0xFF
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef __cplusplus
 | 
				
			||||||
 | 
					extern "C" {
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					uint8_t MatrixKeyScan(void);
 | 
				
			||||||
 | 
					extern uint8_t const KeyTable[16];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef __cplusplus
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
@ -69,12 +69,16 @@ void Error_Handler(void);
 | 
				
			|||||||
#define OE_GPIO_Port GPIOC
 | 
					#define OE_GPIO_Port GPIOC
 | 
				
			||||||
#define SegLedData_Pin GPIO_PIN_0
 | 
					#define SegLedData_Pin GPIO_PIN_0
 | 
				
			||||||
#define SegLedData_GPIO_Port GPIOA
 | 
					#define SegLedData_GPIO_Port GPIOA
 | 
				
			||||||
 | 
					#define KeyLine_Pin GPIO_PIN_0
 | 
				
			||||||
 | 
					#define KeyLine_GPIO_Port GPIOB
 | 
				
			||||||
#define LCD_RST_Pin GPIO_PIN_11
 | 
					#define LCD_RST_Pin GPIO_PIN_11
 | 
				
			||||||
#define LCD_RST_GPIO_Port GPIOB
 | 
					#define LCD_RST_GPIO_Port GPIOB
 | 
				
			||||||
#define LCD_CS_Pin GPIO_PIN_12
 | 
					#define LCD_CS_Pin GPIO_PIN_12
 | 
				
			||||||
#define LCD_CS_GPIO_Port GPIOB
 | 
					#define LCD_CS_GPIO_Port GPIOB
 | 
				
			||||||
#define LCD_RS_Pin GPIO_PIN_14
 | 
					#define LCD_RS_Pin GPIO_PIN_14
 | 
				
			||||||
#define LCD_RS_GPIO_Port GPIOB
 | 
					#define LCD_RS_GPIO_Port GPIOB
 | 
				
			||||||
 | 
					#define KeyRow_Pin GPIO_PIN_4
 | 
				
			||||||
 | 
					#define KeyRow_GPIO_Port GPIOB
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* USER CODE BEGIN Private defines */
 | 
					/* USER CODE BEGIN Private defines */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										95
									
								
								FinalHomework/Core/Src/MatrixKey.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										95
									
								
								FinalHomework/Core/Src/MatrixKey.c
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,95 @@
 | 
				
			|||||||
 | 
					#include "MatrixKey.h"
 | 
				
			||||||
 | 
					#include "main.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// EDB7 xx EDB7
 | 
				
			||||||
 | 
					uint8_t const KeyTable[16] = {
 | 
				
			||||||
 | 
					    0xEE, 0xDE, 0xBE, 0x7E,
 | 
				
			||||||
 | 
					    0xED, 0xDD, 0xBD, 0x7D,
 | 
				
			||||||
 | 
					    0xEB, 0xDB, 0xBB, 0x7B,
 | 
				
			||||||
 | 
					    0xE7, 0xD7, 0xB7, 0x77,
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void LineIn_RowOut(void) {
 | 
				
			||||||
 | 
					    GPIO_InitTypeDef GPIO_InitStruct = {0};
 | 
				
			||||||
 | 
					    /*Configure GPIO pin : PtPin */
 | 
				
			||||||
 | 
					    /*Configure GPIO pins : PCPin PC1 PC2 PC3 */
 | 
				
			||||||
 | 
					    GPIO_InitStruct.Pin = KeyLine_Pin | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3;
 | 
				
			||||||
 | 
					    GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
 | 
				
			||||||
 | 
					    GPIO_InitStruct.Pull = GPIO_PULLUP;
 | 
				
			||||||
 | 
					    HAL_GPIO_Init(KeyLine_GPIO_Port, &GPIO_InitStruct);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    GPIO_InitStruct.Pin = KeyRow_Pin | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7;
 | 
				
			||||||
 | 
					    GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
 | 
				
			||||||
 | 
					    GPIO_InitStruct.Pull = GPIO_PULLUP;
 | 
				
			||||||
 | 
					    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
 | 
				
			||||||
 | 
					    HAL_GPIO_Init(KeyRow_GPIO_Port, &GPIO_InitStruct);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void LineOut_RowIn(void) {
 | 
				
			||||||
 | 
					    GPIO_InitTypeDef GPIO_InitStruct = {0};
 | 
				
			||||||
 | 
					    /*Configure GPIO pin : PtPin */
 | 
				
			||||||
 | 
					    /*Configure GPIO pins : PCPin PC1 PC2 PC3 */
 | 
				
			||||||
 | 
					    GPIO_InitStruct.Pin = KeyLine_Pin | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3;
 | 
				
			||||||
 | 
					    GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
 | 
				
			||||||
 | 
					    GPIO_InitStruct.Pull = GPIO_PULLUP;
 | 
				
			||||||
 | 
					    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
 | 
				
			||||||
 | 
					    HAL_GPIO_Init(KeyLine_GPIO_Port, &GPIO_InitStruct);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    GPIO_InitStruct.Pin = KeyRow_Pin | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7;
 | 
				
			||||||
 | 
					    GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
 | 
				
			||||||
 | 
					    GPIO_InitStruct.Pull = GPIO_PULLUP;
 | 
				
			||||||
 | 
					    HAL_GPIO_Init(KeyRow_GPIO_Port, &GPIO_InitStruct);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					uint8_t MatrixKeyScan(void) {
 | 
				
			||||||
 | 
					    static uint8_t Keystate = State0;
 | 
				
			||||||
 | 
					    static uint8_t KeyLine, KeyRow;
 | 
				
			||||||
 | 
					    static uint16_t KeyOld;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    uint8_t KeyValue = NO_KEY;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    LineOut_RowIn();
 | 
				
			||||||
 | 
					    /*Configure GPIO pin Output Level */
 | 
				
			||||||
 | 
					    HAL_GPIO_WritePin(KeyLine_GPIO_Port, KeyLine_Pin | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3, GPIO_PIN_RESET); // 这四个按位或操作后是0x0F
 | 
				
			||||||
 | 
					    HAL_GPIO_WritePin(KeyLine_GPIO_Port, KeyLine_Pin | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3, GPIO_PIN_RESET); // 重复三次使更稳定
 | 
				
			||||||
 | 
					    HAL_GPIO_WritePin(KeyLine_GPIO_Port, KeyLine_Pin | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3, GPIO_PIN_RESET); // 刚写入后不能直接读要等稳定了再读
 | 
				
			||||||
 | 
					    KeyRow = KeyRow_GPIO_Port->IDR & 0x00F0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    LineIn_RowOut();
 | 
				
			||||||
 | 
					    HAL_GPIO_WritePin(KeyRow_GPIO_Port, KeyRow_Pin | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7, GPIO_PIN_RESET);
 | 
				
			||||||
 | 
					    HAL_GPIO_WritePin(KeyRow_GPIO_Port, KeyRow_Pin | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7, GPIO_PIN_RESET); // 这里也是重复三次
 | 
				
			||||||
 | 
					    HAL_GPIO_WritePin(KeyRow_GPIO_Port, KeyRow_Pin | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7, GPIO_PIN_RESET);
 | 
				
			||||||
 | 
					    KeyLine = KeyLine_GPIO_Port->IDR & 0x000F;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    switch (Keystate) {
 | 
				
			||||||
 | 
					    case State0:
 | 
				
			||||||
 | 
					        KeyOld = KeyLine | KeyRow;
 | 
				
			||||||
 | 
					        if (KeyOld != NO_KEY) {
 | 
				
			||||||
 | 
					            Keystate = State1;
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            Keystate = State0;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    case State1:
 | 
				
			||||||
 | 
					        if ((KeyLine | KeyRow) == KeyOld) {
 | 
				
			||||||
 | 
					            Keystate = State2;
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            Keystate = State0;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    case State2:
 | 
				
			||||||
 | 
					        if ((KeyLine | KeyRow) == NO_KEY) {   // 键已释放
 | 
				
			||||||
 | 
					            Keystate = State0;
 | 
				
			||||||
 | 
					            KeyValue = KeyOld; 
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            Keystate = State2;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    default:
 | 
				
			||||||
 | 
					        break;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    return KeyValue;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -79,6 +79,14 @@ void MX_GPIO_Init(void)
 | 
				
			|||||||
  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
 | 
					  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
 | 
				
			||||||
  HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
 | 
					  HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /*Configure GPIO pins : PBPin PB1 PB2 PB3
 | 
				
			||||||
 | 
					                           PBPin PB5 PB6 PB7 */
 | 
				
			||||||
 | 
					  GPIO_InitStruct.Pin = KeyLine_Pin|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3
 | 
				
			||||||
 | 
					                          |KeyRow_Pin|GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7;
 | 
				
			||||||
 | 
					  GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
 | 
				
			||||||
 | 
					  GPIO_InitStruct.Pull = GPIO_PULLUP;
 | 
				
			||||||
 | 
					  HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /*Configure GPIO pins : PBPin PBPin PBPin */
 | 
					  /*Configure GPIO pins : PBPin PBPin PBPin */
 | 
				
			||||||
  GPIO_InitStruct.Pin = LCD_RST_Pin|LCD_CS_Pin|LCD_RS_Pin;
 | 
					  GPIO_InitStruct.Pin = LCD_RST_Pin|LCD_CS_Pin|LCD_RS_Pin;
 | 
				
			||||||
  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
 | 
					  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
 | 
				
			||||||
@ -86,6 +94,30 @@ void MX_GPIO_Init(void)
 | 
				
			|||||||
  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
 | 
					  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
 | 
				
			||||||
  HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
 | 
					  HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /*Configure GPIO pin : PC6 */
 | 
				
			||||||
 | 
					  GPIO_InitStruct.Pin = GPIO_PIN_6;
 | 
				
			||||||
 | 
					  GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
 | 
				
			||||||
 | 
					  GPIO_InitStruct.Pull = GPIO_NOPULL;
 | 
				
			||||||
 | 
					  HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /*Configure GPIO pins : PC7 PC8 PC9 */
 | 
				
			||||||
 | 
					  GPIO_InitStruct.Pin = GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_9;
 | 
				
			||||||
 | 
					  GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
 | 
				
			||||||
 | 
					  GPIO_InitStruct.Pull = GPIO_PULLUP;
 | 
				
			||||||
 | 
					  HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /*Configure GPIO pin : PA8 */
 | 
				
			||||||
 | 
					  GPIO_InitStruct.Pin = GPIO_PIN_8;
 | 
				
			||||||
 | 
					  GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
 | 
				
			||||||
 | 
					  GPIO_InitStruct.Pull = GPIO_NOPULL;
 | 
				
			||||||
 | 
					  HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /*Configure GPIO pins : PA9 PA10 PA11 */
 | 
				
			||||||
 | 
					  GPIO_InitStruct.Pin = GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_11;
 | 
				
			||||||
 | 
					  GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
 | 
				
			||||||
 | 
					  GPIO_InitStruct.Pull = GPIO_PULLUP;
 | 
				
			||||||
 | 
					  HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* USER CODE BEGIN 2 */
 | 
					/* USER CODE BEGIN 2 */
 | 
				
			||||||
 | 
				
			|||||||
@ -28,6 +28,7 @@
 | 
				
			|||||||
#include "lcd.h"
 | 
					#include "lcd.h"
 | 
				
			||||||
#include "test.h"
 | 
					#include "test.h"
 | 
				
			||||||
#include "SegLed.h"
 | 
					#include "SegLed.h"
 | 
				
			||||||
 | 
					#include "MatrixKey.h"
 | 
				
			||||||
/* USER CODE END Includes */
 | 
					/* USER CODE END Includes */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Private typedef -----------------------------------------------------------*/
 | 
					/* Private typedef -----------------------------------------------------------*/
 | 
				
			||||||
@ -82,7 +83,7 @@ int main(void)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /* USER CODE BEGIN 1 */
 | 
					  /* USER CODE BEGIN 1 */
 | 
				
			||||||
 | 
					  uint8_t KeyValue = 0;
 | 
				
			||||||
  /* USER CODE END 1 */
 | 
					  /* USER CODE END 1 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /* MCU Configuration--------------------------------------------------------*/
 | 
					  /* MCU Configuration--------------------------------------------------------*/
 | 
				
			||||||
@ -118,8 +119,17 @@ int main(void)
 | 
				
			|||||||
    /* USER CODE END WHILE */
 | 
					    /* USER CODE END WHILE */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* USER CODE BEGIN 3 */
 | 
					    /* USER CODE BEGIN 3 */
 | 
				
			||||||
    if (stTime.bTenMilIsOk) {
 | 
					    if (sSysTickTimer.bTenMilSecOk) {
 | 
				
			||||||
      stTime.bTenMilIsOk = 0;
 | 
					      sSysTickTimer.bTenMilSecOk = 0;
 | 
				
			||||||
 | 
					      KeyValue = MatrixKeyScan();
 | 
				
			||||||
 | 
					      if (KeyValue != NO_KEY) {
 | 
				
			||||||
 | 
					        for (int i = 0; i < 16; i++) {
 | 
				
			||||||
 | 
					          if (KeyValue == KeyTable[i]) {
 | 
				
			||||||
 | 
					            tempValue = i;
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        DispToBuff(tempValue);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if (stTime.bSecondIsOk) {
 | 
					    if (stTime.bSecondIsOk) {
 | 
				
			||||||
      stTime.bSecondIsOk = 0;
 | 
					      stTime.bSecondIsOk = 0;
 | 
				
			||||||
@ -141,7 +151,7 @@ int main(void)
 | 
				
			|||||||
    // Test_Triangle();
 | 
					    // Test_Triangle();
 | 
				
			||||||
    // English_Font_test();
 | 
					    // English_Font_test();
 | 
				
			||||||
    // Chinese_Font_test();
 | 
					    // Chinese_Font_test();
 | 
				
			||||||
    Pic_test();
 | 
					    // Pic_test();
 | 
				
			||||||
    // Rotate_Test();
 | 
					    // Rotate_Test();
 | 
				
			||||||
    if (sSysTickTimer.bTimeOk) {
 | 
					    if (sSysTickTimer.bTimeOk) {
 | 
				
			||||||
      sSysTickTimer.bTimeOk = 0;
 | 
					      sSysTickTimer.bTimeOk = 0;
 | 
				
			||||||
 | 
				
			|||||||
@ -22,25 +22,41 @@ Mcu.Pin11=PA4
 | 
				
			|||||||
Mcu.Pin12=PA5
 | 
					Mcu.Pin12=PA5
 | 
				
			||||||
Mcu.Pin13=PA6
 | 
					Mcu.Pin13=PA6
 | 
				
			||||||
Mcu.Pin14=PA7
 | 
					Mcu.Pin14=PA7
 | 
				
			||||||
Mcu.Pin15=PB11
 | 
					Mcu.Pin15=PB0
 | 
				
			||||||
Mcu.Pin16=PB12
 | 
					Mcu.Pin16=PB1
 | 
				
			||||||
Mcu.Pin17=PB13
 | 
					Mcu.Pin17=PB2
 | 
				
			||||||
Mcu.Pin18=PB14
 | 
					Mcu.Pin18=PB11
 | 
				
			||||||
Mcu.Pin19=PB15
 | 
					Mcu.Pin19=PB12
 | 
				
			||||||
Mcu.Pin2=PF1-OSC_OUT
 | 
					Mcu.Pin2=PF1-OSC_OUT
 | 
				
			||||||
Mcu.Pin20=PA13
 | 
					Mcu.Pin20=PB13
 | 
				
			||||||
Mcu.Pin21=PA14
 | 
					Mcu.Pin21=PB14
 | 
				
			||||||
Mcu.Pin22=VP_SYS_VS_Systick
 | 
					Mcu.Pin22=PB15
 | 
				
			||||||
Mcu.Pin23=VP_SYS_VS_DBSignals
 | 
					Mcu.Pin23=PC6
 | 
				
			||||||
Mcu.Pin24=VP_TIM3_VS_ClockSourceINT
 | 
					Mcu.Pin24=PC7
 | 
				
			||||||
 | 
					Mcu.Pin25=PC8
 | 
				
			||||||
 | 
					Mcu.Pin26=PC9
 | 
				
			||||||
 | 
					Mcu.Pin27=PA8
 | 
				
			||||||
 | 
					Mcu.Pin28=PA9
 | 
				
			||||||
 | 
					Mcu.Pin29=PA10
 | 
				
			||||||
Mcu.Pin3=PC0
 | 
					Mcu.Pin3=PC0
 | 
				
			||||||
 | 
					Mcu.Pin30=PA11
 | 
				
			||||||
 | 
					Mcu.Pin31=PA13
 | 
				
			||||||
 | 
					Mcu.Pin32=PA14
 | 
				
			||||||
 | 
					Mcu.Pin33=PB3
 | 
				
			||||||
 | 
					Mcu.Pin34=PB4
 | 
				
			||||||
 | 
					Mcu.Pin35=PB5
 | 
				
			||||||
 | 
					Mcu.Pin36=PB6
 | 
				
			||||||
 | 
					Mcu.Pin37=PB7
 | 
				
			||||||
 | 
					Mcu.Pin38=VP_SYS_VS_Systick
 | 
				
			||||||
 | 
					Mcu.Pin39=VP_SYS_VS_DBSignals
 | 
				
			||||||
Mcu.Pin4=PC1
 | 
					Mcu.Pin4=PC1
 | 
				
			||||||
 | 
					Mcu.Pin40=VP_TIM3_VS_ClockSourceINT
 | 
				
			||||||
Mcu.Pin5=PC2
 | 
					Mcu.Pin5=PC2
 | 
				
			||||||
Mcu.Pin6=PC3
 | 
					Mcu.Pin6=PC3
 | 
				
			||||||
Mcu.Pin7=PA0
 | 
					Mcu.Pin7=PA0
 | 
				
			||||||
Mcu.Pin8=PA1
 | 
					Mcu.Pin8=PA1
 | 
				
			||||||
Mcu.Pin9=PA2
 | 
					Mcu.Pin9=PA2
 | 
				
			||||||
Mcu.PinsNb=25
 | 
					Mcu.PinsNb=41
 | 
				
			||||||
Mcu.ThirdPartyNb=0
 | 
					Mcu.ThirdPartyNb=0
 | 
				
			||||||
Mcu.UserConstants=
 | 
					Mcu.UserConstants=
 | 
				
			||||||
Mcu.UserName=STM32G473RCTx
 | 
					Mcu.UserName=STM32G473RCTx
 | 
				
			||||||
@ -69,6 +85,14 @@ PA1.GPIO_PuPd=GPIO_PULLUP
 | 
				
			|||||||
PA1.Locked=true
 | 
					PA1.Locked=true
 | 
				
			||||||
PA1.PinState=GPIO_PIN_SET
 | 
					PA1.PinState=GPIO_PIN_SET
 | 
				
			||||||
PA1.Signal=GPIO_Output
 | 
					PA1.Signal=GPIO_Output
 | 
				
			||||||
 | 
					PA10.GPIOParameters=GPIO_PuPd
 | 
				
			||||||
 | 
					PA10.GPIO_PuPd=GPIO_PULLUP
 | 
				
			||||||
 | 
					PA10.Locked=true
 | 
				
			||||||
 | 
					PA10.Signal=GPIO_Input
 | 
				
			||||||
 | 
					PA11.GPIOParameters=GPIO_PuPd
 | 
				
			||||||
 | 
					PA11.GPIO_PuPd=GPIO_PULLUP
 | 
				
			||||||
 | 
					PA11.Locked=true
 | 
				
			||||||
 | 
					PA11.Signal=GPIO_Input
 | 
				
			||||||
PA13.Mode=Serial_Wire
 | 
					PA13.Mode=Serial_Wire
 | 
				
			||||||
PA13.Signal=SYS_JTMS-SWDIO
 | 
					PA13.Signal=SYS_JTMS-SWDIO
 | 
				
			||||||
PA14.Mode=Serial_Wire
 | 
					PA14.Mode=Serial_Wire
 | 
				
			||||||
@ -103,6 +127,21 @@ PA7.GPIO_PuPd=GPIO_PULLUP
 | 
				
			|||||||
PA7.Locked=true
 | 
					PA7.Locked=true
 | 
				
			||||||
PA7.PinState=GPIO_PIN_SET
 | 
					PA7.PinState=GPIO_PIN_SET
 | 
				
			||||||
PA7.Signal=GPIO_Output
 | 
					PA7.Signal=GPIO_Output
 | 
				
			||||||
 | 
					PA8.Locked=true
 | 
				
			||||||
 | 
					PA8.Signal=GPIO_Input
 | 
				
			||||||
 | 
					PA9.GPIOParameters=GPIO_PuPd
 | 
				
			||||||
 | 
					PA9.GPIO_PuPd=GPIO_PULLUP
 | 
				
			||||||
 | 
					PA9.Locked=true
 | 
				
			||||||
 | 
					PA9.Signal=GPIO_Input
 | 
				
			||||||
 | 
					PB0.GPIOParameters=GPIO_PuPd,GPIO_Label
 | 
				
			||||||
 | 
					PB0.GPIO_Label=KeyLine
 | 
				
			||||||
 | 
					PB0.GPIO_PuPd=GPIO_PULLUP
 | 
				
			||||||
 | 
					PB0.Locked=true
 | 
				
			||||||
 | 
					PB0.Signal=GPIO_Input
 | 
				
			||||||
 | 
					PB1.GPIOParameters=GPIO_PuPd
 | 
				
			||||||
 | 
					PB1.GPIO_PuPd=GPIO_PULLUP
 | 
				
			||||||
 | 
					PB1.Locked=true
 | 
				
			||||||
 | 
					PB1.Signal=GPIO_Input
 | 
				
			||||||
PB11.GPIOParameters=GPIO_Speed,GPIO_PuPd,GPIO_Label
 | 
					PB11.GPIOParameters=GPIO_Speed,GPIO_PuPd,GPIO_Label
 | 
				
			||||||
PB11.GPIO_Label=LCD_RST
 | 
					PB11.GPIO_Label=LCD_RST
 | 
				
			||||||
PB11.GPIO_PuPd=GPIO_PULLUP
 | 
					PB11.GPIO_PuPd=GPIO_PULLUP
 | 
				
			||||||
@ -125,6 +164,31 @@ PB14.Locked=true
 | 
				
			|||||||
PB14.Signal=GPIO_Output
 | 
					PB14.Signal=GPIO_Output
 | 
				
			||||||
PB15.Mode=TX_Only_Simplex_Unidirect_Master
 | 
					PB15.Mode=TX_Only_Simplex_Unidirect_Master
 | 
				
			||||||
PB15.Signal=SPI2_MOSI
 | 
					PB15.Signal=SPI2_MOSI
 | 
				
			||||||
 | 
					PB2.GPIOParameters=GPIO_PuPd
 | 
				
			||||||
 | 
					PB2.GPIO_PuPd=GPIO_PULLUP
 | 
				
			||||||
 | 
					PB2.Locked=true
 | 
				
			||||||
 | 
					PB2.Signal=GPIO_Input
 | 
				
			||||||
 | 
					PB3.GPIOParameters=GPIO_PuPd
 | 
				
			||||||
 | 
					PB3.GPIO_PuPd=GPIO_PULLUP
 | 
				
			||||||
 | 
					PB3.Locked=true
 | 
				
			||||||
 | 
					PB3.Signal=GPIO_Input
 | 
				
			||||||
 | 
					PB4.GPIOParameters=GPIO_PuPd,GPIO_Label
 | 
				
			||||||
 | 
					PB4.GPIO_Label=KeyRow
 | 
				
			||||||
 | 
					PB4.GPIO_PuPd=GPIO_PULLUP
 | 
				
			||||||
 | 
					PB4.Locked=true
 | 
				
			||||||
 | 
					PB4.Signal=GPIO_Input
 | 
				
			||||||
 | 
					PB5.GPIOParameters=GPIO_PuPd
 | 
				
			||||||
 | 
					PB5.GPIO_PuPd=GPIO_PULLUP
 | 
				
			||||||
 | 
					PB5.Locked=true
 | 
				
			||||||
 | 
					PB5.Signal=GPIO_Input
 | 
				
			||||||
 | 
					PB6.GPIOParameters=GPIO_PuPd
 | 
				
			||||||
 | 
					PB6.GPIO_PuPd=GPIO_PULLUP
 | 
				
			||||||
 | 
					PB6.Locked=true
 | 
				
			||||||
 | 
					PB6.Signal=GPIO_Input
 | 
				
			||||||
 | 
					PB7.GPIOParameters=GPIO_PuPd
 | 
				
			||||||
 | 
					PB7.GPIO_PuPd=GPIO_PULLUP
 | 
				
			||||||
 | 
					PB7.Locked=true
 | 
				
			||||||
 | 
					PB7.Signal=GPIO_Input
 | 
				
			||||||
PC0.GPIOParameters=GPIO_PuPd,GPIO_Label
 | 
					PC0.GPIOParameters=GPIO_PuPd,GPIO_Label
 | 
				
			||||||
PC0.GPIO_Label=AddrA
 | 
					PC0.GPIO_Label=AddrA
 | 
				
			||||||
PC0.GPIO_PuPd=GPIO_PULLUP
 | 
					PC0.GPIO_PuPd=GPIO_PULLUP
 | 
				
			||||||
@ -150,6 +214,20 @@ PC3.GPIO_Label=OE
 | 
				
			|||||||
PC3.GPIO_PuPd=GPIO_PULLUP
 | 
					PC3.GPIO_PuPd=GPIO_PULLUP
 | 
				
			||||||
PC3.Locked=true
 | 
					PC3.Locked=true
 | 
				
			||||||
PC3.Signal=GPIO_Output
 | 
					PC3.Signal=GPIO_Output
 | 
				
			||||||
 | 
					PC6.Locked=true
 | 
				
			||||||
 | 
					PC6.Signal=GPIO_Input
 | 
				
			||||||
 | 
					PC7.GPIOParameters=GPIO_PuPd
 | 
				
			||||||
 | 
					PC7.GPIO_PuPd=GPIO_PULLUP
 | 
				
			||||||
 | 
					PC7.Locked=true
 | 
				
			||||||
 | 
					PC7.Signal=GPIO_Input
 | 
				
			||||||
 | 
					PC8.GPIOParameters=GPIO_PuPd
 | 
				
			||||||
 | 
					PC8.GPIO_PuPd=GPIO_PULLUP
 | 
				
			||||||
 | 
					PC8.Locked=true
 | 
				
			||||||
 | 
					PC8.Signal=GPIO_Input
 | 
				
			||||||
 | 
					PC9.GPIOParameters=GPIO_PuPd
 | 
				
			||||||
 | 
					PC9.GPIO_PuPd=GPIO_PULLUP
 | 
				
			||||||
 | 
					PC9.Locked=true
 | 
				
			||||||
 | 
					PC9.Signal=GPIO_Input
 | 
				
			||||||
PF0-OSC_IN.Mode=HSE-External-Oscillator
 | 
					PF0-OSC_IN.Mode=HSE-External-Oscillator
 | 
				
			||||||
PF0-OSC_IN.Signal=RCC_OSC_IN
 | 
					PF0-OSC_IN.Signal=RCC_OSC_IN
 | 
				
			||||||
PF1-OSC_OUT.Mode=HSE-External-Oscillator
 | 
					PF1-OSC_OUT.Mode=HSE-External-Oscillator
 | 
				
			||||||
@ -185,7 +263,7 @@ ProjectManager.ToolChainLocation=
 | 
				
			|||||||
ProjectManager.UAScriptAfterPath=
 | 
					ProjectManager.UAScriptAfterPath=
 | 
				
			||||||
ProjectManager.UAScriptBeforePath=
 | 
					ProjectManager.UAScriptBeforePath=
 | 
				
			||||||
ProjectManager.UnderRoot=false
 | 
					ProjectManager.UnderRoot=false
 | 
				
			||||||
ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_SPI2_Init-SPI2-false-HAL-true
 | 
					ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_SPI2_Init-SPI2-false-HAL-true,4-MX_TIM3_Init-TIM3-false-HAL-true
 | 
				
			||||||
RCC.ADC12Freq_Value=170000000
 | 
					RCC.ADC12Freq_Value=170000000
 | 
				
			||||||
RCC.ADC345Freq_Value=170000000
 | 
					RCC.ADC345Freq_Value=170000000
 | 
				
			||||||
RCC.AHBFreq_Value=170000000
 | 
					RCC.AHBFreq_Value=170000000
 | 
				
			||||||
 | 
				
			|||||||
@ -438,6 +438,26 @@
 | 
				
			|||||||
              <FileType>5</FileType>
 | 
					              <FileType>5</FileType>
 | 
				
			||||||
              <FilePath>..\Core\Inc\variable.h</FilePath>
 | 
					              <FilePath>..\Core\Inc\variable.h</FilePath>
 | 
				
			||||||
            </File>
 | 
					            </File>
 | 
				
			||||||
 | 
					            <File>
 | 
				
			||||||
 | 
					              <FileName>SegLed.h</FileName>
 | 
				
			||||||
 | 
					              <FileType>5</FileType>
 | 
				
			||||||
 | 
					              <FilePath>..\Core\Inc\SegLed.h</FilePath>
 | 
				
			||||||
 | 
					            </File>
 | 
				
			||||||
 | 
					            <File>
 | 
				
			||||||
 | 
					              <FileName>SegLed.c</FileName>
 | 
				
			||||||
 | 
					              <FileType>1</FileType>
 | 
				
			||||||
 | 
					              <FilePath>..\Core\Src\SegLed.c</FilePath>
 | 
				
			||||||
 | 
					            </File>
 | 
				
			||||||
 | 
					            <File>
 | 
				
			||||||
 | 
					              <FileName>MatrixKey.c</FileName>
 | 
				
			||||||
 | 
					              <FileType>1</FileType>
 | 
				
			||||||
 | 
					              <FilePath>..\Core\Src\MatrixKey.c</FilePath>
 | 
				
			||||||
 | 
					            </File>
 | 
				
			||||||
 | 
					            <File>
 | 
				
			||||||
 | 
					              <FileName>MatrixKey.h</FileName>
 | 
				
			||||||
 | 
					              <FileType>5</FileType>
 | 
				
			||||||
 | 
					              <FilePath>..\Core\Inc\MatrixKey.h</FilePath>
 | 
				
			||||||
 | 
					            </File>
 | 
				
			||||||
            <File>
 | 
					            <File>
 | 
				
			||||||
              <FileName>main.c</FileName>
 | 
					              <FileName>main.c</FileName>
 | 
				
			||||||
              <FileType>1</FileType>
 | 
					              <FileType>1</FileType>
 | 
				
			||||||
@ -519,16 +539,6 @@
 | 
				
			|||||||
              <FileType>1</FileType>
 | 
					              <FileType>1</FileType>
 | 
				
			||||||
              <FilePath>../Core/Src/stm32g4xx_hal_msp.c</FilePath>
 | 
					              <FilePath>../Core/Src/stm32g4xx_hal_msp.c</FilePath>
 | 
				
			||||||
            </File>
 | 
					            </File>
 | 
				
			||||||
            <File>
 | 
					 | 
				
			||||||
              <FileName>SegLed.h</FileName>
 | 
					 | 
				
			||||||
              <FileType>5</FileType>
 | 
					 | 
				
			||||||
              <FilePath>..\Core\Inc\SegLed.h</FilePath>
 | 
					 | 
				
			||||||
            </File>
 | 
					 | 
				
			||||||
            <File>
 | 
					 | 
				
			||||||
              <FileName>SegLed.c</FileName>
 | 
					 | 
				
			||||||
              <FileType>1</FileType>
 | 
					 | 
				
			||||||
              <FilePath>..\Core\Src\SegLed.c</FilePath>
 | 
					 | 
				
			||||||
            </File>
 | 
					 | 
				
			||||||
          </Files>
 | 
					          </Files>
 | 
				
			||||||
        </Group>
 | 
					        </Group>
 | 
				
			||||||
        <Group>
 | 
					        <Group>
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user