hannachifaten
Member level 2
- Joined
- May 1, 2013
- Messages
- 44
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,286
- Activity points
- 1,769
Hello every body ,
i neeeed help :/
my aim is to read a bit data from input pins and after that i will get this data to output such led , i want to try my leds
i configure my GPIO INPUT logic and out put push pull for led , but the code is seem to be wrong i 'didt find what is the problemme
i just need to write code to interface logic pin ; this is my code *
pleaaaase i need your suggestions and thank you in advance
i neeeed help :/
my aim is to read a bit data from input pins and after that i will get this data to output such led , i want to try my leds
i configure my GPIO INPUT logic and out put push pull for led , but the code is seem to be wrong i 'didt find what is the problemme
i just need to write code to interface logic pin ; this is my code *
Code:
int main( void) {
/* initialize the GPIO pins we need */
init_GPIO();
while (1) {
if ((GPIO_ReadInputDataBit(GPIOD, GPIO_Pin_0) == 1) )
{
GPIOI->BSRRL = GPIO_Pin_10 ;
}
else
{
GPIOI->BSRRH = GPIO_Pin_10 ;
}
if ((GPIO_ReadInputDataBit(GPIOD, GPIO_Pin_1) == 0))
{
GPIOI->BSRRL = GPIO_Pin_11;
}
else
{
GPIOI->BSRRH = GPIO_Pin_11 ;
}
}
}
pleaaaase i need your suggestions and thank you in advance