This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdbool.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <assert.h> | |
static bool bitmask_writeU32( uint32_t *const address, const uint32_t mask, | |
const uint32_t pos, const uint32_t value ) | |
{ | |
const bool success = ( ( address != NULL ) && ( pos < 32U ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdint.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <sys/time.h> | |
typedef struct | |
{ | |
float dampingFactor; | |
float dampingCoeff; | |
float target; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdint.h> | |
void printb(const char* name, const uint16_t value) { | |
printf("%s: 0b", name); | |
for (int i = 15; i >= 0; --i) { | |
printf("%d", (value >> i) & 1); | |
} | |
printf("\n"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
char buffer[] ="\n\ | |
source state,1\n\ | |
source state,2\n\ | |
source state,3\n\ | |
source state,4\n\ | |
\n\ |