Advertisement
Guest User

Untitled

a guest
May 15th, 2022
12
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. #ifndef __ATMEGA328P_H__
  3. #define __ATMEGA328P_H__
  4.  
  5. #include <stdint.h>
  6. #include <stdbool.h>
  7.  
  8. typedef struct
  9. {
  10.     volatile uint8_t *base_register;
  11.     uint8_t pin_bitmask;
  12. } pin_t;
  13.  
  14. extern void pin_config_output(pin_t pin);
  15. extern void pin_config_input(pin_t pin);
  16. extern void pin_set_output_value(pin_t pin, bool output_value);
  17. extern bool pin_get_input_value(pin_t pin);
  18. extern void pin_pullup_enable(pin_t pin);
  19.  
  20. #endif
Advertisement
RAW Paste Data Copied
Advertisement