You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
804 B

8 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __GPIO_SUBSYSTEM_HEADER__
  2. #define __GPIO_SUBSYSTEM_HEADER__
  3. #include <stdio.h>
  4. #include <fcntl.h>
  5. #include <unistd.h>
  6. #include <errno.h>
  7. #include <string.h>
  8. #include <sys/mman.h>
  9. #include <sys/types.h>
  10. #include <sys/stat.h>
  11. #include "../../general/sitara-am437x.h"
  12. #include "gpio_regs.h"
  13. bool init_GPIO_0( void );
  14. bool init_GPIO_1( void );
  15. bool init_GPIO_2( void );
  16. bool init_GPIO_3( void );
  17. bool init_GPIO_4( void );
  18. bool init_GPIO_5( void );
  19. void setGPIO_Bit( uint8_t system, uint8_t bit );
  20. uint32_t getInputsGPIO( uint8_t system );
  21. uint32_t getOutputsGPIO( uint8_t system );
  22. uint32_t getOutputMode( uint8_t system );
  23. void setOutputMode( uint8_t system, uint32_t mode );
  24. void setOutputDirect( uint8_t system, uint32_t mode );
  25. void close_GPIO( void );
  26. #endif