merge
This commit is contained in:
parent
8b5fc40ee5
commit
4f0208d8b2
@ -5,7 +5,7 @@
|
|||||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||||
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="1212502137914603586" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="1420177214715349582" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||||
</provider>
|
</provider>
|
||||||
@ -16,7 +16,7 @@
|
|||||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||||
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="1212502137914603586" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="1420177214715349582" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||||
</provider>
|
</provider>
|
||||||
|
|||||||
203
Core/Src/main.c
203
Core/Src/main.c
@ -54,17 +54,18 @@ uint8_t delta;
|
|||||||
|
|
||||||
#define DELTA_KP_BIT 0
|
#define DELTA_KP_BIT 0
|
||||||
#define DELTA_BTN_BIT 1
|
#define DELTA_BTN_BIT 1
|
||||||
#define DELTA_CARD_PRESENT_BIT 2
|
#define DELTA_TOUCH_BIT 2
|
||||||
#define DELTA_CARD_ID_BIT 3
|
#define DELTA_CARD_PRESENT_BIT 3
|
||||||
|
#define DELTA_CARD_ID_BIT 4
|
||||||
|
|
||||||
uint8_t i2c_register;
|
uint8_t i2c_register;
|
||||||
|
|
||||||
// TODO: this doesn't need to be high and low, it can simply send 2 bytes
|
|
||||||
#define I2C_REGISTER_DELTA 1
|
#define I2C_REGISTER_DELTA 1
|
||||||
#define I2C_REGISTER_KEYPAD 2
|
#define I2C_REGISTER_KEYPAD 2
|
||||||
#define I2C_REGISTER_BUTTON 3
|
#define I2C_REGISTER_BUTTON 3
|
||||||
#define I2C_REGISTER_RFID_PRESENT 4
|
#define I2C_REGISTER_TOUCH 4
|
||||||
#define I2C_REGISTER_RFID_ID 5
|
#define I2C_REGISTER_RFID_PRESENT 5
|
||||||
|
#define I2C_REGISTER_RFID_ID 6
|
||||||
|
|
||||||
uint16_t old_keypad_state = 0;
|
uint16_t old_keypad_state = 0;
|
||||||
uint16_t keypad_state = 0;
|
uint16_t keypad_state = 0;
|
||||||
@ -72,6 +73,9 @@ uint16_t keypad_state = 0;
|
|||||||
uint16_t old_button_state = 0;
|
uint16_t old_button_state = 0;
|
||||||
uint16_t button_state = 0;
|
uint16_t button_state = 0;
|
||||||
|
|
||||||
|
uint8_t old_touch_state = 0;
|
||||||
|
uint8_t touch_state = 0;
|
||||||
|
|
||||||
uint8_t old_card_present = 0;
|
uint8_t old_card_present = 0;
|
||||||
uint8_t card_present = 0;
|
uint8_t card_present = 0;
|
||||||
|
|
||||||
@ -97,6 +101,10 @@ static void MX_USART2_UART_Init(void);
|
|||||||
|
|
||||||
void scan_keypad(void);
|
void scan_keypad(void);
|
||||||
void scan_buttons(void);
|
void scan_buttons(void);
|
||||||
|
void scan_touch(void);
|
||||||
|
|
||||||
|
void send_register(void);
|
||||||
|
void send_interupt(void);
|
||||||
void rfid_check_card(void);
|
void rfid_check_card(void);
|
||||||
|
|
||||||
void send_iterupt(void);
|
void send_iterupt(void);
|
||||||
@ -147,11 +155,9 @@ int main(void)
|
|||||||
MX_SPI1_Init();
|
MX_SPI1_Init();
|
||||||
MX_USART2_UART_Init();
|
MX_USART2_UART_Init();
|
||||||
/* USER CODE BEGIN 2 */
|
/* USER CODE BEGIN 2 */
|
||||||
|
rc522_init();
|
||||||
// rc522_init();
|
|
||||||
HAL_I2C_EnableListen_IT(&hi2c1);
|
HAL_I2C_EnableListen_IT(&hi2c1);
|
||||||
// printf("initialized\r\n");
|
// printf("initialized\r\n");
|
||||||
|
|
||||||
/* USER CODE END 2 */
|
/* USER CODE END 2 */
|
||||||
|
|
||||||
/* Infinite loop */
|
/* Infinite loop */
|
||||||
@ -161,13 +167,10 @@ int main(void)
|
|||||||
// HAL_Delay(1);
|
// HAL_Delay(1);
|
||||||
scan_keypad();
|
scan_keypad();
|
||||||
scan_buttons();
|
scan_buttons();
|
||||||
|
scan_touch();
|
||||||
// rfid_check_card();
|
// rfid_check_card();
|
||||||
send_iterupt();
|
send_iterupt();
|
||||||
|
|
||||||
// printf("s: %d\r\n", keypad_state);
|
|
||||||
// printf("r: %d\r\n", recv_cnt);
|
|
||||||
// printf("d: %d %d %d %d, %d %d %d %d\r\n", data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7]);
|
|
||||||
|
|
||||||
/* USER CODE END WHILE */
|
/* USER CODE END WHILE */
|
||||||
|
|
||||||
/* USER CODE BEGIN 3 */
|
/* USER CODE BEGIN 3 */
|
||||||
@ -367,6 +370,9 @@ static void MX_GPIO_Init(void)
|
|||||||
__HAL_RCC_GPIOC_CLK_ENABLE();
|
__HAL_RCC_GPIOC_CLK_ENABLE();
|
||||||
__HAL_RCC_GPIOD_CLK_ENABLE();
|
__HAL_RCC_GPIOD_CLK_ENABLE();
|
||||||
|
|
||||||
|
/*Configure GPIO pin Output Level */
|
||||||
|
HAL_GPIO_WritePin(GPIOA, INT_Pin|ROW1_Pin|ROW2_Pin|ROW3_Pin, GPIO_PIN_SET);
|
||||||
|
|
||||||
/*Configure GPIO pin Output Level */
|
/*Configure GPIO pin Output Level */
|
||||||
HAL_GPIO_WritePin(RFID_CS_GPIO_Port, RFID_CS_Pin, GPIO_PIN_RESET);
|
HAL_GPIO_WritePin(RFID_CS_GPIO_Port, RFID_CS_Pin, GPIO_PIN_RESET);
|
||||||
|
|
||||||
@ -374,28 +380,24 @@ static void MX_GPIO_Init(void)
|
|||||||
HAL_GPIO_WritePin(RFID_RST_GPIO_Port, RFID_RST_Pin, GPIO_PIN_RESET);
|
HAL_GPIO_WritePin(RFID_RST_GPIO_Port, RFID_RST_Pin, GPIO_PIN_RESET);
|
||||||
|
|
||||||
/*Configure GPIO pin Output Level */
|
/*Configure GPIO pin Output Level */
|
||||||
HAL_GPIO_WritePin(GPIOB, COL1_Pin|KP_C2_Pin|KP_C3_Pin|KP_C4_Pin, GPIO_PIN_SET);
|
HAL_GPIO_WritePin(GPIOD, ROW4_Pin|KP_C1_Pin, GPIO_PIN_SET);
|
||||||
|
|
||||||
/*Configure GPIO pin Output Level */
|
/*Configure GPIO pin Output Level */
|
||||||
HAL_GPIO_WritePin(COL2_GPIO_Port, COL2_Pin, GPIO_PIN_SET);
|
HAL_GPIO_WritePin(GPIOB, KP_C2_Pin|KP_C3_Pin|KP_C4_Pin, GPIO_PIN_SET);
|
||||||
|
|
||||||
/*Configure GPIO pin Output Level */
|
|
||||||
HAL_GPIO_WritePin(GPIOD, COL3_Pin|KP_C1_Pin, GPIO_PIN_SET);
|
|
||||||
|
|
||||||
/*Configure GPIO pin : INT_Pin */
|
/*Configure GPIO pin : INT_Pin */
|
||||||
GPIO_InitStruct.Pin = INT_Pin;
|
GPIO_InitStruct.Pin = INT_Pin;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_OD;
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
||||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
GPIO_InitStruct.Alternate = GPIO_AF7_EVENTOUT;
|
|
||||||
HAL_GPIO_Init(INT_GPIO_Port, &GPIO_InitStruct);
|
HAL_GPIO_Init(INT_GPIO_Port, &GPIO_InitStruct);
|
||||||
|
|
||||||
/*Configure GPIO pin : RFID_CS_Pin */
|
/*Configure GPIO pins : RFID_CS_Pin ROW1_Pin ROW2_Pin ROW3_Pin */
|
||||||
GPIO_InitStruct.Pin = RFID_CS_Pin;
|
GPIO_InitStruct.Pin = RFID_CS_Pin|ROW1_Pin|ROW2_Pin|ROW3_Pin;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
HAL_GPIO_Init(RFID_CS_GPIO_Port, &GPIO_InitStruct);
|
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||||
|
|
||||||
/*Configure GPIO pins : HALL_Pin CLOSE_Pin */
|
/*Configure GPIO pins : HALL_Pin CLOSE_Pin */
|
||||||
GPIO_InitStruct.Pin = HALL_Pin|CLOSE_Pin;
|
GPIO_InitStruct.Pin = HALL_Pin|CLOSE_Pin;
|
||||||
@ -416,18 +418,18 @@ static void MX_GPIO_Init(void)
|
|||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
||||||
|
|
||||||
/*Configure GPIO pins : COL1_Pin KP_C2_Pin KP_C3_Pin KP_C4_Pin */
|
/*Configure GPIO pins : COL1_Pin KP_R1_Pin KP_R2_Pin KP_R3_Pin
|
||||||
GPIO_InitStruct.Pin = COL1_Pin|KP_C2_Pin|KP_C3_Pin|KP_C4_Pin;
|
KP_R4_Pin */
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_OD;
|
GPIO_InitStruct.Pin = COL1_Pin|KP_R1_Pin|KP_R2_Pin|KP_R3_Pin
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|KP_R4_Pin;
|
||||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
||||||
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
||||||
|
|
||||||
/*Configure GPIO pin : COL2_Pin */
|
/*Configure GPIO pin : COL2_Pin */
|
||||||
GPIO_InitStruct.Pin = COL2_Pin;
|
GPIO_InitStruct.Pin = COL2_Pin;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_OD;
|
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
||||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
|
||||||
HAL_GPIO_Init(COL2_GPIO_Port, &GPIO_InitStruct);
|
HAL_GPIO_Init(COL2_GPIO_Port, &GPIO_InitStruct);
|
||||||
|
|
||||||
/*Configure GPIO pins : SWT3_Pin SWT4_Pin */
|
/*Configure GPIO pins : SWT3_Pin SWT4_Pin */
|
||||||
@ -436,29 +438,37 @@ static void MX_GPIO_Init(void)
|
|||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
||||||
|
|
||||||
/*Configure GPIO pins : ROW1_Pin ROW2_Pin ROW3_Pin */
|
/*Configure GPIO pin : ROW4_Pin */
|
||||||
GPIO_InitStruct.Pin = ROW1_Pin|ROW2_Pin|ROW3_Pin;
|
GPIO_InitStruct.Pin = ROW4_Pin;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
|
HAL_GPIO_Init(ROW4_GPIO_Port, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/*Configure GPIO pin : COL3_Pin */
|
||||||
|
GPIO_InitStruct.Pin = COL3_Pin;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
||||||
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
||||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
HAL_GPIO_Init(COL3_GPIO_Port, &GPIO_InitStruct);
|
||||||
|
|
||||||
/*Configure GPIO pins : ROW4_Pin TOUCH_Pin */
|
/*Configure GPIO pin : TOUCH_Pin */
|
||||||
GPIO_InitStruct.Pin = ROW4_Pin|TOUCH_Pin;
|
GPIO_InitStruct.Pin = TOUCH_Pin;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
|
HAL_GPIO_Init(TOUCH_GPIO_Port, &GPIO_InitStruct);
|
||||||
|
|
||||||
/*Configure GPIO pins : COL3_Pin KP_C1_Pin */
|
/*Configure GPIO pin : KP_C1_Pin */
|
||||||
GPIO_InitStruct.Pin = COL3_Pin|KP_C1_Pin;
|
GPIO_InitStruct.Pin = KP_C1_Pin;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_OD;
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_OD;
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
|
HAL_GPIO_Init(KP_C1_GPIO_Port, &GPIO_InitStruct);
|
||||||
|
|
||||||
/*Configure GPIO pins : KP_R1_Pin KP_R2_Pin KP_R3_Pin KP_R4_Pin */
|
/*Configure GPIO pins : KP_C2_Pin KP_C3_Pin KP_C4_Pin */
|
||||||
GPIO_InitStruct.Pin = KP_R1_Pin|KP_R2_Pin|KP_R3_Pin|KP_R4_Pin;
|
GPIO_InitStruct.Pin = KP_C2_Pin|KP_C3_Pin|KP_C4_Pin;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_OD;
|
||||||
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
||||||
|
|
||||||
/* USER CODE BEGIN MX_GPIO_Init_2 */
|
/* USER CODE BEGIN MX_GPIO_Init_2 */
|
||||||
@ -499,17 +509,21 @@ void send_register(void) {
|
|||||||
case I2C_REGISTER_KEYPAD:
|
case I2C_REGISTER_KEYPAD:
|
||||||
send_data[0] = keypad_state & 0xFF;
|
send_data[0] = keypad_state & 0xFF;
|
||||||
send_data[1] = keypad_state >> 8;
|
send_data[1] = keypad_state >> 8;
|
||||||
HAL_I2C_Slave_Seq_Transmit_IT(&hi2c1, &send_data, 2, I2C_NEXT_FRAME);
|
HAL_I2C_Slave_Seq_Transmit_IT(&hi2c1, send_data, 2, I2C_NEXT_FRAME);
|
||||||
delta &= ~(1 << DELTA_KP_BIT);
|
delta &= ~(1 << DELTA_KP_BIT);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case I2C_REGISTER_BUTTON:
|
case I2C_REGISTER_BUTTON:
|
||||||
send_data[0] = button_state & 0xFF;
|
send_data[0] = button_state & 0xFF;
|
||||||
send_data[1] = button_state >> 8;
|
send_data[1] = button_state >> 8;
|
||||||
HAL_I2C_Slave_Seq_Transmit_IT(&hi2c1, &send_data, 2, I2C_NEXT_FRAME);
|
HAL_I2C_Slave_Seq_Transmit_IT(&hi2c1, send_data, 2, I2C_NEXT_FRAME);
|
||||||
delta &= ~(1 << DELTA_BTN_BIT);
|
delta &= ~(1 << DELTA_BTN_BIT);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case I2C_REGISTER_TOUCH:
|
||||||
|
HAL_I2C_Slave_Seq_Transmit_IT(&hi2c1, &touch_state, 1, I2C_NEXT_FRAME);
|
||||||
|
delta &= ~(1 << DELTA_TOUCH_BIT);
|
||||||
|
break;
|
||||||
case I2C_REGISTER_RFID_PRESENT:
|
case I2C_REGISTER_RFID_PRESENT:
|
||||||
HAL_I2C_Slave_Seq_Transmit_IT(&hi2c1, &card_present, 1, I2C_NEXT_FRAME);
|
HAL_I2C_Slave_Seq_Transmit_IT(&hi2c1, &card_present, 1, I2C_NEXT_FRAME);
|
||||||
delta &= ~(1 << DELTA_CARD_PRESENT_BIT);
|
delta &= ~(1 << DELTA_CARD_PRESENT_BIT);
|
||||||
@ -525,6 +539,7 @@ void send_register(void) {
|
|||||||
|
|
||||||
void HAL_I2C_SlaveRxCpltCallback(I2C_HandleTypeDef *hi2c)
|
void HAL_I2C_SlaveRxCpltCallback(I2C_HandleTypeDef *hi2c)
|
||||||
{
|
{
|
||||||
|
send_register();
|
||||||
}
|
}
|
||||||
|
|
||||||
void HAL_I2C_SlaveTxCpltCallback(I2C_HandleTypeDef *hi2c)
|
void HAL_I2C_SlaveTxCpltCallback(I2C_HandleTypeDef *hi2c)
|
||||||
@ -536,71 +551,93 @@ void scan_keypad(void)
|
|||||||
uint16_t new_keypad_state = 0;
|
uint16_t new_keypad_state = 0;
|
||||||
|
|
||||||
HAL_GPIO_WritePin(KP_C1_GPIO_Port, KP_C1_Pin, GPIO_PIN_RESET);
|
HAL_GPIO_WritePin(KP_C1_GPIO_Port, KP_C1_Pin, GPIO_PIN_RESET);
|
||||||
keypad_state |= (HAL_GPIO_ReadPin(KP_R1_GPIO_Port, KP_R1_Pin) == GPIO_PIN_RESET) << 0;
|
new_keypad_state |= (HAL_GPIO_ReadPin(KP_R1_GPIO_Port, KP_R1_Pin) == GPIO_PIN_RESET) << 0;
|
||||||
keypad_state |= (HAL_GPIO_ReadPin(KP_R2_GPIO_Port, KP_R2_Pin) == GPIO_PIN_RESET) << 1;
|
new_keypad_state |= (HAL_GPIO_ReadPin(KP_R2_GPIO_Port, KP_R2_Pin) == GPIO_PIN_RESET) << 1;
|
||||||
keypad_state |= (HAL_GPIO_ReadPin(KP_R3_GPIO_Port, KP_R3_Pin) == GPIO_PIN_RESET) << 2;
|
new_keypad_state |= (HAL_GPIO_ReadPin(KP_R3_GPIO_Port, KP_R3_Pin) == GPIO_PIN_RESET) << 2;
|
||||||
keypad_state |= (HAL_GPIO_ReadPin(KP_R4_GPIO_Port, KP_R4_Pin) == GPIO_PIN_RESET) << 3;
|
new_keypad_state |= (HAL_GPIO_ReadPin(KP_R4_GPIO_Port, KP_R4_Pin) == GPIO_PIN_RESET) << 3;
|
||||||
HAL_GPIO_WritePin(KP_C1_GPIO_Port, KP_C1_Pin, GPIO_PIN_SET);
|
HAL_GPIO_WritePin(KP_C1_GPIO_Port, KP_C1_Pin, GPIO_PIN_SET);
|
||||||
|
|
||||||
HAL_GPIO_WritePin(KP_C2_GPIO_Port, KP_C2_Pin, GPIO_PIN_RESET);
|
HAL_GPIO_WritePin(KP_C2_GPIO_Port, KP_C2_Pin, GPIO_PIN_RESET);
|
||||||
keypad_state |= (HAL_GPIO_ReadPin(KP_R1_GPIO_Port, KP_R1_Pin) == GPIO_PIN_RESET) << 4;
|
new_keypad_state |= (HAL_GPIO_ReadPin(KP_R1_GPIO_Port, KP_R1_Pin) == GPIO_PIN_RESET) << 4;
|
||||||
keypad_state |= (HAL_GPIO_ReadPin(KP_R2_GPIO_Port, KP_R2_Pin) == GPIO_PIN_RESET) << 5;
|
new_keypad_state |= (HAL_GPIO_ReadPin(KP_R2_GPIO_Port, KP_R2_Pin) == GPIO_PIN_RESET) << 5;
|
||||||
keypad_state |= (HAL_GPIO_ReadPin(KP_R3_GPIO_Port, KP_R3_Pin) == GPIO_PIN_RESET) << 6;
|
new_keypad_state |= (HAL_GPIO_ReadPin(KP_R3_GPIO_Port, KP_R3_Pin) == GPIO_PIN_RESET) << 6;
|
||||||
keypad_state |= (HAL_GPIO_ReadPin(KP_R4_GPIO_Port, KP_R4_Pin) == GPIO_PIN_RESET) << 7;
|
new_keypad_state |= (HAL_GPIO_ReadPin(KP_R4_GPIO_Port, KP_R4_Pin) == GPIO_PIN_RESET) << 7;
|
||||||
HAL_GPIO_WritePin(KP_C2_GPIO_Port, KP_C2_Pin, GPIO_PIN_SET);
|
HAL_GPIO_WritePin(KP_C2_GPIO_Port, KP_C2_Pin, GPIO_PIN_SET);
|
||||||
|
|
||||||
HAL_GPIO_WritePin(KP_C3_GPIO_Port, KP_C3_Pin, GPIO_PIN_RESET);
|
HAL_GPIO_WritePin(KP_C3_GPIO_Port, KP_C3_Pin, GPIO_PIN_RESET);
|
||||||
keypad_state |= (HAL_GPIO_ReadPin(KP_R1_GPIO_Port, KP_R1_Pin) == GPIO_PIN_RESET) << 8;
|
new_keypad_state |= (HAL_GPIO_ReadPin(KP_R1_GPIO_Port, KP_R1_Pin) == GPIO_PIN_RESET) << 8;
|
||||||
keypad_state |= (HAL_GPIO_ReadPin(KP_R2_GPIO_Port, KP_R2_Pin) == GPIO_PIN_RESET) << 9;
|
new_keypad_state |= (HAL_GPIO_ReadPin(KP_R2_GPIO_Port, KP_R2_Pin) == GPIO_PIN_RESET) << 9;
|
||||||
keypad_state |= (HAL_GPIO_ReadPin(KP_R3_GPIO_Port, KP_R3_Pin) == GPIO_PIN_RESET) << 10;
|
new_keypad_state |= (HAL_GPIO_ReadPin(KP_R3_GPIO_Port, KP_R3_Pin) == GPIO_PIN_RESET) << 10;
|
||||||
keypad_state |= (HAL_GPIO_ReadPin(KP_R4_GPIO_Port, KP_R4_Pin) == GPIO_PIN_RESET) << 11;
|
new_keypad_state |= (HAL_GPIO_ReadPin(KP_R4_GPIO_Port, KP_R4_Pin) == GPIO_PIN_RESET) << 11;
|
||||||
HAL_GPIO_WritePin(KP_C3_GPIO_Port, KP_C3_Pin, GPIO_PIN_SET);
|
HAL_GPIO_WritePin(KP_C3_GPIO_Port, KP_C3_Pin, GPIO_PIN_SET);
|
||||||
|
|
||||||
HAL_GPIO_WritePin(KP_C4_GPIO_Port, KP_C4_Pin, GPIO_PIN_RESET);
|
HAL_GPIO_WritePin(KP_C4_GPIO_Port, KP_C4_Pin, GPIO_PIN_RESET);
|
||||||
keypad_state |= (HAL_GPIO_ReadPin(KP_R1_GPIO_Port, KP_R1_Pin) == GPIO_PIN_RESET) << 12;
|
new_keypad_state |= (HAL_GPIO_ReadPin(KP_R1_GPIO_Port, KP_R1_Pin) == GPIO_PIN_RESET) << 12;
|
||||||
keypad_state |= (HAL_GPIO_ReadPin(KP_R2_GPIO_Port, KP_R2_Pin) == GPIO_PIN_RESET) << 13;
|
new_keypad_state |= (HAL_GPIO_ReadPin(KP_R2_GPIO_Port, KP_R2_Pin) == GPIO_PIN_RESET) << 13;
|
||||||
keypad_state |= (HAL_GPIO_ReadPin(KP_R3_GPIO_Port, KP_R3_Pin) == GPIO_PIN_RESET) << 14;
|
new_keypad_state |= (HAL_GPIO_ReadPin(KP_R3_GPIO_Port, KP_R3_Pin) == GPIO_PIN_RESET) << 14;
|
||||||
keypad_state |= (HAL_GPIO_ReadPin(KP_R4_GPIO_Port, KP_R4_Pin) == GPIO_PIN_RESET) << 15;
|
new_keypad_state |= (HAL_GPIO_ReadPin(KP_R4_GPIO_Port, KP_R4_Pin) == GPIO_PIN_RESET) << 15;
|
||||||
HAL_GPIO_WritePin(KP_C4_GPIO_Port, KP_C4_Pin, GPIO_PIN_SET);
|
HAL_GPIO_WritePin(KP_C4_GPIO_Port, KP_C4_Pin, GPIO_PIN_SET);
|
||||||
|
|
||||||
|
__disable_irq();
|
||||||
old_keypad_state = keypad_state;
|
old_keypad_state = keypad_state;
|
||||||
keypad_state = new_keypad_state;
|
keypad_state = new_keypad_state;
|
||||||
if (keypad_state != old_keypad_state) {
|
if (keypad_state != old_keypad_state) {
|
||||||
delta |= 1 << DELTA_KP_BIT;
|
delta |= 1 << DELTA_KP_BIT;
|
||||||
}
|
}
|
||||||
|
__enable_irq();
|
||||||
}
|
}
|
||||||
|
|
||||||
void scan_buttons(void)
|
void scan_buttons(void)
|
||||||
{
|
{
|
||||||
uint16_t new_button_state = 0;
|
uint16_t new_button_state = 0;
|
||||||
|
|
||||||
HAL_GPIO_WritePin(COL1_GPIO_Port, COL1_Pin, GPIO_PIN_SET);
|
HAL_GPIO_WritePin(ROW1_GPIO_Port, ROW1_Pin, GPIO_PIN_RESET);
|
||||||
button_state |= (HAL_GPIO_ReadPin(ROW1_GPIO_Port, ROW1_Pin) == GPIO_PIN_RESET) << 0;
|
new_button_state |= (HAL_GPIO_ReadPin(COL1_GPIO_Port, COL1_Pin) == GPIO_PIN_RESET) << 0;
|
||||||
button_state |= (HAL_GPIO_ReadPin(ROW2_GPIO_Port, ROW2_Pin) == GPIO_PIN_RESET) << 1;
|
new_button_state |= (HAL_GPIO_ReadPin(COL2_GPIO_Port, COL2_Pin) == GPIO_PIN_RESET) << 4;
|
||||||
button_state |= (HAL_GPIO_ReadPin(ROW3_GPIO_Port, ROW3_Pin) == GPIO_PIN_RESET) << 2;
|
new_button_state |= (HAL_GPIO_ReadPin(COL3_GPIO_Port, COL3_Pin) == GPIO_PIN_RESET) << 8;
|
||||||
button_state |= (HAL_GPIO_ReadPin(ROW4_GPIO_Port, ROW4_Pin) == GPIO_PIN_RESET) << 3;
|
HAL_GPIO_WritePin(ROW1_GPIO_Port, ROW1_Pin, GPIO_PIN_SET);
|
||||||
HAL_GPIO_WritePin(COL1_GPIO_Port, COL1_Pin, GPIO_PIN_RESET);
|
|
||||||
|
|
||||||
HAL_GPIO_WritePin(COL2_GPIO_Port, COL2_Pin, GPIO_PIN_SET);
|
HAL_GPIO_WritePin(ROW2_GPIO_Port, ROW2_Pin, GPIO_PIN_RESET);
|
||||||
button_state |= (HAL_GPIO_ReadPin(ROW1_GPIO_Port, ROW1_Pin) == GPIO_PIN_RESET) << 4;
|
new_button_state |= (HAL_GPIO_ReadPin(COL1_GPIO_Port, COL1_Pin) == GPIO_PIN_RESET) << 1;
|
||||||
button_state |= (HAL_GPIO_ReadPin(ROW2_GPIO_Port, ROW2_Pin) == GPIO_PIN_RESET) << 5;
|
new_button_state |= (HAL_GPIO_ReadPin(COL2_GPIO_Port, COL2_Pin) == GPIO_PIN_RESET) << 5;
|
||||||
button_state |= (HAL_GPIO_ReadPin(ROW3_GPIO_Port, ROW3_Pin) == GPIO_PIN_RESET) << 6;
|
new_button_state |= (HAL_GPIO_ReadPin(COL3_GPIO_Port, COL3_Pin) == GPIO_PIN_RESET) << 9;
|
||||||
button_state |= (HAL_GPIO_ReadPin(ROW4_GPIO_Port, ROW4_Pin) == GPIO_PIN_RESET) << 7;
|
HAL_GPIO_WritePin(ROW2_GPIO_Port, ROW2_Pin, GPIO_PIN_SET);
|
||||||
HAL_GPIO_WritePin(COL2_GPIO_Port, COL2_Pin, GPIO_PIN_RESET);
|
|
||||||
|
|
||||||
HAL_GPIO_WritePin(COL3_GPIO_Port, COL3_Pin, GPIO_PIN_SET);
|
HAL_GPIO_WritePin(ROW3_GPIO_Port, ROW3_Pin, GPIO_PIN_RESET);
|
||||||
button_state |= (HAL_GPIO_ReadPin(ROW1_GPIO_Port, ROW1_Pin) == GPIO_PIN_RESET) << 8;
|
new_button_state |= (HAL_GPIO_ReadPin(COL1_GPIO_Port, COL1_Pin) == GPIO_PIN_RESET) << 2;
|
||||||
button_state |= (HAL_GPIO_ReadPin(ROW2_GPIO_Port, ROW2_Pin) == GPIO_PIN_RESET) << 9;
|
new_button_state |= (HAL_GPIO_ReadPin(COL2_GPIO_Port, COL2_Pin) == GPIO_PIN_RESET) << 6;
|
||||||
button_state |= (HAL_GPIO_ReadPin(ROW3_GPIO_Port, ROW3_Pin) == GPIO_PIN_RESET) << 10;
|
new_button_state |= (HAL_GPIO_ReadPin(COL3_GPIO_Port, COL3_Pin) == GPIO_PIN_RESET) << 10;
|
||||||
button_state |= (HAL_GPIO_ReadPin(ROW4_GPIO_Port, ROW4_Pin) == GPIO_PIN_RESET) << 11;
|
HAL_GPIO_WritePin(ROW3_GPIO_Port, ROW3_Pin, GPIO_PIN_SET);
|
||||||
HAL_GPIO_WritePin(COL3_GPIO_Port, COL3_Pin, GPIO_PIN_RESET);
|
|
||||||
|
|
||||||
// TODO: read the touch sensors here too!
|
HAL_GPIO_WritePin(ROW4_GPIO_Port, ROW4_Pin, GPIO_PIN_RESET);
|
||||||
|
new_button_state |= (HAL_GPIO_ReadPin(COL1_GPIO_Port, COL1_Pin) == GPIO_PIN_RESET) << 3;
|
||||||
|
new_button_state |= (HAL_GPIO_ReadPin(COL2_GPIO_Port, COL2_Pin) == GPIO_PIN_RESET) << 7;
|
||||||
|
new_button_state |= (HAL_GPIO_ReadPin(COL3_GPIO_Port, COL3_Pin) == GPIO_PIN_RESET) << 11;
|
||||||
|
HAL_GPIO_WritePin(ROW4_GPIO_Port, ROW4_Pin, GPIO_PIN_SET);
|
||||||
|
|
||||||
|
new_button_state |= HAL_GPIO_ReadPin(SWT1_GPIO_Port, SWT1_Pin) << 12;
|
||||||
|
new_button_state |= HAL_GPIO_ReadPin(SWT2_GPIO_Port, SWT2_Pin) << 13;
|
||||||
|
new_button_state |= HAL_GPIO_ReadPin(SWT3_GPIO_Port, SWT3_Pin) << 14;
|
||||||
|
new_button_state |= HAL_GPIO_ReadPin(SWT4_GPIO_Port, SWT4_Pin) << 15;
|
||||||
|
|
||||||
|
__disable_irq();
|
||||||
old_button_state = button_state;
|
old_button_state = button_state;
|
||||||
button_state = new_button_state;
|
button_state = new_button_state;
|
||||||
|
|
||||||
if (button_state != old_button_state) {
|
if (button_state != old_button_state) {
|
||||||
delta |= 1 << DELTA_KP_BIT;
|
delta |= 1 << DELTA_BTN_BIT;
|
||||||
|
}
|
||||||
|
__enable_irq();
|
||||||
|
}
|
||||||
|
|
||||||
|
void scan_touch(void)
|
||||||
|
{
|
||||||
|
uint16_t new_touch_state = HAL_GPIO_ReadPin(TOUCH_GPIO_Port, TOUCH_Pin);
|
||||||
|
|
||||||
|
old_touch_state = touch_state;
|
||||||
|
touch_state = new_touch_state;
|
||||||
|
if (touch_state != old_touch_state) {
|
||||||
|
delta |= 1 << DELTA_TOUCH_BIT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -624,7 +661,7 @@ void rfid_check_card() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void send_iterupt(void)
|
void send_interupt(void)
|
||||||
{
|
{
|
||||||
if (delta != old_delta) {
|
if (delta != old_delta) {
|
||||||
old_delta = delta;
|
old_delta = delta;
|
||||||
|
|||||||
@ -70,34 +70,42 @@ NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
|
|||||||
NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
|
NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
|
||||||
NVIC.SVC_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:true
|
NVIC.SVC_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:true
|
||||||
NVIC.SysTick_IRQn=true\:3\:0\:false\:false\:true\:false\:true\:false
|
NVIC.SysTick_IRQn=true\:3\:0\:false\:false\:true\:false\:true\:false
|
||||||
PA1.GPIOParameters=GPIO_PuPd,GPIO_Label
|
PA1.GPIOParameters=PinState,GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultOutputPP
|
||||||
PA1.GPIO_Label=INT
|
PA1.GPIO_Label=INT
|
||||||
PA1.GPIO_PuPd=GPIO_NOPULL
|
PA1.GPIO_ModeDefaultOutputPP=GPIO_MODE_OUTPUT_OD
|
||||||
|
PA1.GPIO_PuPd=GPIO_PULLUP
|
||||||
PA1.Locked=true
|
PA1.Locked=true
|
||||||
PA1.Signal=EVENTOUT
|
PA1.PinState=GPIO_PIN_SET
|
||||||
|
PA1.Signal=GPIO_Output
|
||||||
PA10.Locked=true
|
PA10.Locked=true
|
||||||
PA10.Mode=I2C
|
PA10.Mode=I2C
|
||||||
PA10.Signal=I2C1_SDA
|
PA10.Signal=I2C1_SDA
|
||||||
PA11\ [PA9].GPIOParameters=GPIO_PuPd,GPIO_Label
|
PA11\ [PA9].GPIOParameters=PinState,GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultOutputPP
|
||||||
PA11\ [PA9].GPIO_Label=ROW1
|
PA11\ [PA9].GPIO_Label=ROW1
|
||||||
PA11\ [PA9].GPIO_PuPd=GPIO_PULLUP
|
PA11\ [PA9].GPIO_ModeDefaultOutputPP=GPIO_MODE_OUTPUT_PP
|
||||||
|
PA11\ [PA9].GPIO_PuPd=GPIO_NOPULL
|
||||||
PA11\ [PA9].Locked=true
|
PA11\ [PA9].Locked=true
|
||||||
PA11\ [PA9].Signal=GPIO_Input
|
PA11\ [PA9].PinState=GPIO_PIN_SET
|
||||||
PA12\ [PA10].GPIOParameters=GPIO_PuPd,GPIO_Label
|
PA11\ [PA9].Signal=GPIO_Output
|
||||||
|
PA12\ [PA10].GPIOParameters=PinState,GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultOutputPP
|
||||||
PA12\ [PA10].GPIO_Label=ROW2
|
PA12\ [PA10].GPIO_Label=ROW2
|
||||||
PA12\ [PA10].GPIO_PuPd=GPIO_PULLUP
|
PA12\ [PA10].GPIO_ModeDefaultOutputPP=GPIO_MODE_OUTPUT_PP
|
||||||
|
PA12\ [PA10].GPIO_PuPd=GPIO_NOPULL
|
||||||
PA12\ [PA10].Locked=true
|
PA12\ [PA10].Locked=true
|
||||||
PA12\ [PA10].Signal=GPIO_Input
|
PA12\ [PA10].PinState=GPIO_PIN_SET
|
||||||
|
PA12\ [PA10].Signal=GPIO_Output
|
||||||
PA13.Locked=true
|
PA13.Locked=true
|
||||||
PA13.Mode=Serial_Wire
|
PA13.Mode=Serial_Wire
|
||||||
PA13.Signal=SYS_SWDIO
|
PA13.Signal=SYS_SWDIO
|
||||||
PA14-BOOT0.Mode=Serial_Wire
|
PA14-BOOT0.Mode=Serial_Wire
|
||||||
PA14-BOOT0.Signal=SYS_SWCLK
|
PA14-BOOT0.Signal=SYS_SWCLK
|
||||||
PA15.GPIOParameters=GPIO_PuPd,GPIO_Label
|
PA15.GPIOParameters=PinState,GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultOutputPP
|
||||||
PA15.GPIO_Label=ROW3
|
PA15.GPIO_Label=ROW3
|
||||||
PA15.GPIO_PuPd=GPIO_PULLUP
|
PA15.GPIO_ModeDefaultOutputPP=GPIO_MODE_OUTPUT_PP
|
||||||
|
PA15.GPIO_PuPd=GPIO_NOPULL
|
||||||
PA15.Locked=true
|
PA15.Locked=true
|
||||||
PA15.Signal=GPIO_Input
|
PA15.PinState=GPIO_PIN_SET
|
||||||
|
PA15.Signal=GPIO_Output
|
||||||
PA2.Locked=true
|
PA2.Locked=true
|
||||||
PA2.Mode=Asynchronous
|
PA2.Mode=Asynchronous
|
||||||
PA2.Signal=USART2_TX
|
PA2.Signal=USART2_TX
|
||||||
@ -117,13 +125,11 @@ PA6.Signal=SPI1_MISO
|
|||||||
PA7.Locked=true
|
PA7.Locked=true
|
||||||
PA7.Mode=Full_Duplex_Master
|
PA7.Mode=Full_Duplex_Master
|
||||||
PA7.Signal=SPI1_MOSI
|
PA7.Signal=SPI1_MOSI
|
||||||
PA8.GPIOParameters=PinState,GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultOutputPP
|
PA8.GPIOParameters=GPIO_PuPd,GPIO_Label
|
||||||
PA8.GPIO_Label=COL2
|
PA8.GPIO_Label=COL2
|
||||||
PA8.GPIO_ModeDefaultOutputPP=GPIO_MODE_OUTPUT_OD
|
PA8.GPIO_PuPd=GPIO_PULLUP
|
||||||
PA8.GPIO_PuPd=GPIO_NOPULL
|
|
||||||
PA8.Locked=true
|
PA8.Locked=true
|
||||||
PA8.PinState=GPIO_PIN_SET
|
PA8.Signal=GPIO_Input
|
||||||
PA8.Signal=GPIO_Output
|
|
||||||
PA9.Locked=true
|
PA9.Locked=true
|
||||||
PA9.Mode=I2C
|
PA9.Mode=I2C
|
||||||
PA9.Signal=I2C1_SCL
|
PA9.Signal=I2C1_SCL
|
||||||
@ -143,13 +149,11 @@ PB11.GPIOParameters=GPIO_Label
|
|||||||
PB11.GPIO_Label=SWT2
|
PB11.GPIO_Label=SWT2
|
||||||
PB11.Locked=true
|
PB11.Locked=true
|
||||||
PB11.Signal=GPIO_Input
|
PB11.Signal=GPIO_Input
|
||||||
PB15.GPIOParameters=PinState,GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultOutputPP
|
PB15.GPIOParameters=GPIO_PuPd,GPIO_Label
|
||||||
PB15.GPIO_Label=COL1
|
PB15.GPIO_Label=COL1
|
||||||
PB15.GPIO_ModeDefaultOutputPP=GPIO_MODE_OUTPUT_OD
|
PB15.GPIO_PuPd=GPIO_PULLUP
|
||||||
PB15.GPIO_PuPd=GPIO_NOPULL
|
|
||||||
PB15.Locked=true
|
PB15.Locked=true
|
||||||
PB15.PinState=GPIO_PIN_SET
|
PB15.Signal=GPIO_Input
|
||||||
PB15.Signal=GPIO_Output
|
|
||||||
PB2.GPIOParameters=GPIO_Label
|
PB2.GPIOParameters=GPIO_Label
|
||||||
PB2.GPIO_Label=RFID_RST
|
PB2.GPIO_Label=RFID_RST
|
||||||
PB2.Locked=true
|
PB2.Locked=true
|
||||||
@ -203,17 +207,18 @@ PC7.GPIOParameters=GPIO_Label
|
|||||||
PC7.GPIO_Label=SWT4
|
PC7.GPIO_Label=SWT4
|
||||||
PC7.Locked=true
|
PC7.Locked=true
|
||||||
PC7.Signal=GPIO_Input
|
PC7.Signal=GPIO_Input
|
||||||
PD0.GPIOParameters=GPIO_Label
|
PD0.GPIOParameters=PinState,GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultOutputPP
|
||||||
PD0.GPIO_Label=ROW4
|
PD0.GPIO_Label=ROW4
|
||||||
|
PD0.GPIO_ModeDefaultOutputPP=GPIO_MODE_OUTPUT_PP
|
||||||
|
PD0.GPIO_PuPd=GPIO_NOPULL
|
||||||
PD0.Locked=true
|
PD0.Locked=true
|
||||||
PD0.Signal=GPIO_Input
|
PD0.PinState=GPIO_PIN_SET
|
||||||
PD1.GPIOParameters=PinState,GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultOutputPP
|
PD0.Signal=GPIO_Output
|
||||||
|
PD1.GPIOParameters=GPIO_PuPd,GPIO_Label
|
||||||
PD1.GPIO_Label=COL3
|
PD1.GPIO_Label=COL3
|
||||||
PD1.GPIO_ModeDefaultOutputPP=GPIO_MODE_OUTPUT_OD
|
PD1.GPIO_PuPd=GPIO_PULLUP
|
||||||
PD1.GPIO_PuPd=GPIO_NOPULL
|
|
||||||
PD1.Locked=true
|
PD1.Locked=true
|
||||||
PD1.PinState=GPIO_PIN_SET
|
PD1.Signal=GPIO_Input
|
||||||
PD1.Signal=GPIO_Output
|
|
||||||
PD2.GPIOParameters=GPIO_Label
|
PD2.GPIOParameters=GPIO_Label
|
||||||
PD2.GPIO_Label=TOUCH
|
PD2.GPIO_Label=TOUCH
|
||||||
PD2.Locked=true
|
PD2.Locked=true
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user