YAML storage (#7071)

YAML storage
This commit is contained in:
Raphael Coeffic
2019-11-12 14:50:05 +01:00
committed by Bertrand Songis
parent bb2ca31dad
commit 8b4d2b698d
69 changed files with 5577 additions and 425 deletions
+20
View File
@@ -0,0 +1,20 @@
#ifndef _yaml_bits_h_
#define _yaml_bits_h_
#include <stdint.h>
void yaml_put_bits(uint8_t* dst, uint32_t i, uint32_t bit_ofs, uint32_t bits);
uint32_t yaml_get_bits(uint8_t* src, uint32_t bit_ofs, uint32_t bits);
// assumes bits is a multiple of 8
bool yaml_is_zero(uint8_t* data, uint32_t bitoffs, uint32_t bits);
int32_t yaml_str2int(const char* val, uint8_t val_len);
uint32_t yaml_str2uint(const char* val, uint8_t val_len);
char* yaml_unsigned2str(uint32_t i);
char* yaml_signed2str(int32_t i);
int32_t yaml_to_signed(uint32_t i, uint32_t bits);
#endif