weird lost code?

This commit is contained in:
Peter D. Gray 2023-05-30 12:00:57 -04:00 committed by scgbckbone
parent c3f5af6d60
commit 675b815ce0
2 changed files with 11 additions and 0 deletions

View File

@ -5,6 +5,7 @@
#include <stdint.h>
#include <stdbool.h>
#include "console.h"
#include "config.h"
extern void fatal_error(const char *) __attribute__((noreturn));

View File

@ -44,6 +44,16 @@ const uint16_t COLOUR_RED = 0x1f;
// track what we are showing so we never re-send same thing (too slow)
static const uint8_t *last_screen;
// memset2()
//
static inline void
memset2(uint16_t *dest, uint16_t value, uint16_t byte_len)
{
for(; byte_len; byte_len-=2, dest++) {
*dest = value;
}
}
/*
// Bytes to send before sending the 1024 bytes of pixel data.
//