Set up for display control on atmega32u4

This commit is contained in:
Savanni D'Gerinel 2022-07-19 21:17:01 -04:00
parent 0d0f90e91d
commit 529cf6067d
2 changed files with 8 additions and 3 deletions

View File

@ -4,9 +4,9 @@
int main(void) {
display_t display = {
.reg = {
.output = { .ddr = &DDRB, .port = &PORTB, .pin = &PINB, .addr = 3 },
.shift_clock = { .ddr = &DDRB, .port = &PORTB, .pin = &PINB, .addr = 2 },
.latch_clock = { .ddr = &DDRB, .port = &PORTB, .pin = &PINB, .addr = 0 },
.output = { .ddr = &DDRF, .port = &PORTF, .pin = &PINF, .addr = 7 },
.shift_clock = { .ddr = &DDRF, .port = &PORTF, .pin = &PINF, .addr = 6 },
.latch_clock = { .ddr = &DDRF, .port = &PORTF, .pin = &PINF, .addr = 5 },
},
};

View File

@ -285,6 +285,11 @@
];
};
packages."x86_64-linux"."display-i2c_" =
let
pkgs = import nixpkgs { system = "x86_64-linux"; };
avr = pkgs.pkgsCross.avr.buildPackages;
in packages."x86_64-linux"."display-i2c" { gcc = "${avr.gcc}/bin/avr-gcc"; cflags = mcu_cflags atmega32u4; avr = true; };
packages."x86_64-linux"."display-i2c" =
{ gcc, cflags, avr }:
let