Feature: transmit_byte for transmitting a single byte

Feature: `all_on` and `all_off` commands for testing
Optimization: marked functions inline
Optimization: inline function for transmitting a single bit
This commit is contained in:
2022-03-11 08:31:40 +01:00
parent 9a326de094
commit 51921de344
3 changed files with 72 additions and 26 deletions

8
main.c
View File

@@ -25,10 +25,6 @@
#include <util/delay.h>
#include "PT6302.h"
/* PT6302 commands */
static const uint8_t lighton = 0x72;
static const uint8_t lightoff = 0x71;
int main ()
{
@@ -46,9 +42,9 @@ int main ()
set_DCRAM (0, characters, DISPLAY_DIGITS);
while (1)
{
transmit_bytes (&lighton, 1);
all_on();
_delay_us (1000);
transmit_bytes (&lightoff, 1);
all_off();
_delay_us (1000);
}
}