Added SMSD non-interactive command line client for Shack-Hartmann control system

This commit is contained in:
eddyem
2015-05-29 10:40:11 +03:00
parent b65a64f635
commit 34bfc07b64
18 changed files with 2549 additions and 63 deletions

15
websockets/testlog2.c Normal file
View File

@@ -0,0 +1,15 @@
#include <stdio.h>
#include <stdint.h>
static inline uint32_t log_2(const uint32_t x){
if(x == 0) return 0;
return (31 - __builtin_clz (x));
}
int main(){
uint32_t i;
for(i = 0; i < 150; i++){
printf("log2(%u) = %u\n", i, log_2(i));
}
return 0;
}