Compare commits

...

2 commits

Author SHA1 Message Date
Kizarm
f653fe0914 hello linux delay thread 2024-08-18 21:29:44 +02:00
Kizarm
273a477a37 lock print 2024-08-17 20:59:36 +02:00
2 changed files with 4 additions and 1 deletions

View file

@ -55,6 +55,7 @@ static constexpr int CC = MAXPWM / 2;
static pthread_t rc; static pthread_t rc;
void * WriteHandler (void * data) { void * WriteHandler (void * data) {
usleep(10'000);
printf ("Start thread\n"); printf ("Start thread\n");
PwmClass * pA = (PwmClass *) data; PwmClass * pA = (PwmClass *) data;
Sample buf [BufLen]; Sample buf [BufLen];

View file

@ -1,10 +1,12 @@
#include <cstdio> #include <cstdio>
#include <mutex>
#include "utils.h" #include "utils.h"
void print_morse_table (const TABLE<unsigned char, 64> & tab) { void print_morse_table (const TABLE<unsigned char, 64> & tab) {
int n = 0; int n = 0;
printf("static const unsigned char compressed_table [] = {"); printf("static const unsigned char compressed_table [] = {");
for (auto & e: tab) { for (auto & e: tab) {
if ((n % 16) == 0) printf("\n"); if ((n % 16) == 0) printf("\n ");
printf("0x%02x,", e); printf("0x%02x,", e);
n++; n++;
} }