Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void getZero()
- {
- print("Zero \b \n");
- XGpio_DiscreteWrite(&GpioOutput, LED_CHANNEL,
- 1 << 12);
- usleep(0.35);
- XGpio_DiscreteWrite(&GpioOutput, LED_CHANNEL,
- 0 << 12);
- usleep(0.8);
- }
- void getOne()
- {
- print("One \b \n");
- XGpio_DiscreteWrite(&GpioOutput, LED_CHANNEL,
- 1 << 12);
- usleep(0.7);
- XGpio_DiscreteWrite(&GpioOutput, LED_CHANNEL,
- 0 << 12);
- usleep(0.6);
- }
- int main()
- {
- int Status,status;
- Status = XGpio_Initialize(&GpioOutput, XPAR_AXI_GPIO_0_DEVICE_ID);
- XGpio_SetDataDirection(&GpioOutput, LED_CHANNEL, 0x0);
- while(1)
- {
- for (int i =0 ; i< 24 ;i++) getOne();
- //I want to send all ONE to get white
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement