mirror of
https://github.com/DashyFox/StackSport.git
synced 2025-06-28 13:19:41 +00:00
indicator
This commit is contained in:
@ -11,6 +11,13 @@ void SetShiftReg_inline(unsigned char b1, unsigned char b2, unsigned char b3){
|
||||
SetShiftReg(shiftreg);
|
||||
}
|
||||
|
||||
//static void Delay(uint16_t d)
|
||||
//{
|
||||
// for (volatile int i = 0; i < d; i++) {
|
||||
// __NOP();
|
||||
// }
|
||||
//}
|
||||
|
||||
void SetShiftReg(unsigned char shiftreg[3])
|
||||
{
|
||||
for (unsigned char i = 0; i < 3; i++)
|
||||
@ -28,6 +35,7 @@ void SetShiftReg(unsigned char shiftreg[3])
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, GPIO_PIN_RESET);
|
||||
|
||||
|
||||
if (((shiftreg[i] >> j) & 0x01) == 0x01)
|
||||
{
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_4, GPIO_PIN_SET);
|
||||
|
Reference in New Issue
Block a user