Advertisement
Guest User

Untitled

a guest
May 15th, 2022
15
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <avr/io.h>
  2. #include "atmega328p.h"
  3. #include "pins.h"
  4.  
  5. const pin_t sensor_data_pin = {&PINB, 1 << 0};
  6. const pin_t ss_segment_pins[] = {
  7.     {&PIND, 1 << 0},    // Segment A.
  8.     {&PIND, 1 << 1},    // Segment B.
  9.     {&PIND, 1 << 2},    // Segment C.
  10.     {&PIND, 1 << 3},    // Segment D.
  11.     {&PIND, 1 << 4},    // Segment E.
  12.     {&PIND, 1 << 5},    // Segment F.
  13.     {&PIND, 1 << 6},    // Segment G.
  14.     {&PIND, 1 << 7},    // Segment H.
  15. };
  16. const pin_t ss_enable_pins[] = {
  17.     {&PINC, 1 << 0},
  18.     {&PINC, 1 << 1},
  19.     {&PINC, 1 << 2},
  20.     {&PINC, 1 << 3},
  21. };
  22. const pin_t reset_saved_temps_btn_pin = {&PINB, 1 << 1};
  23. const pin_t disp_min_temp_btn_pin = {&PINB, 1 << 2};
  24. const pin_t disp_max_temp_btn_pin = {&PINB, 1 << 3};
  25. const pin_t disp_current_temp_btn_pin = {&PINB, 1 << 4};
Advertisement
RAW Paste Data Copied
Advertisement