Rewrite shit register contents
This commit is contained in:
parent
54b7440f90
commit
d63860df8f
1 changed files with 3 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
#include <stdbool.h>
|
||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
#include <avr/interrupt.h>
|
#include <avr/interrupt.h>
|
||||||
#include <util/delay.h>
|
#include <util/delay.h>
|
||||||
|
@ -101,6 +102,8 @@ void strobe() {
|
||||||
static void send_status() {
|
static void send_status() {
|
||||||
// Bit-bang register contents in (also send out zeros, but don't strobe)
|
// Bit-bang register contents in (also send out zeros, but don't strobe)
|
||||||
uint16_t status = bang(0);
|
uint16_t status = bang(0);
|
||||||
|
// Send the current state back out to prevent glitches
|
||||||
|
bang(status);
|
||||||
|
|
||||||
if (can_check_free_buffer()) {
|
if (can_check_free_buffer()) {
|
||||||
can_t msg = {
|
can_t msg = {
|
||||||
|
|
Loading…
Reference in a new issue