Logo
Explore Help
Register Sign In
fengqi/lv_micropython
1
0
Fork 0
You've already forked lv_micropython
Code Issues Pull Requests 1 Actions Packages Projects Releases Wiki Activity
lv_micropython/py/binary.h

9 lines
389 B
C
Raw Normal View History

ffi: Implement ffivar.get()/set() methods. Done by introducing another factored out helper API in binary.c. This API can be reused also by array and struct modules.
2014-02-14 17:16:35 +02:00
// Use special typecode to differentiate repr() of bytearray vs array.array('B')
// (underlyingly they're same).
#define BYTEARRAY_TYPECODE 0
int mp_binary_get_size(char typecode);
mp_obj_t mp_binary_get_val(char typecode, void *p, int index);
py: Start implementing "struct" module. Only calcsize() and unpack() functions provided so far, for little-endian byte order. Format strings don't support repition spec (like "2b3i"). Unfortunately, dealing with all the various binary type sizes and alignments will lead to quite a bloated "binary" helper functions - if optimizing for speed. Need to think if using dynamic parametrized algos makes more sense.
2014-04-10 03:45:38 +03:00
mp_obj_t mp_binary_get_val_unaligned_le(char typecode, byte **ptr);
ffi: Implement ffivar.get()/set() methods. Done by introducing another factored out helper API in binary.c. This API can be reused also by array and struct modules.
2014-02-14 17:16:35 +02:00
void mp_binary_set_val(char typecode, void *p, int index, mp_obj_t val_in);
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 25ms Template: 0ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API