Bouffalo SDK  1.0
Bouffalolab Software Development Kit
bflb_common.h
Go to the documentation of this file.
1 #ifndef _BFLB_COMMON_H
2 #define _BFLB_COMMON_H
3 
4 #include "stdint.h"
5 #include "stdbool.h"
6 
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10 
19 void *arch_memcpy(void *dst, const void *src, uint32_t n);
20 
29 void *arch_memset(void *s, uint8_t c, uint32_t n);
30 
39 int arch_memcmp(const void *s1, const void *s2, uint32_t n);
40 
49 uint32_t *arch_memcpy4(uint32_t *dst, const uint32_t *src, uint32_t n);
50 
59 void *arch_memcpy_fast(void *pdst, const void *psrc, uint32_t n);
60 
69 uint32_t *arch_memset4(uint32_t *dst, const uint32_t val, uint32_t n);
70 
76 void arch_delay_us(uint32_t cnt);
77 
83 void arch_delay_ms(uint32_t cnt);
84 
92 uint16_t bflb_soft_crc16(void *in, uint32_t len);
93 
101 uint32_t bflb_soft_crc32(void *in, uint32_t len);
102 
103 #if defined(BL602) || defined(BL702) || defined(BL702L)
104 #define bflb_check_cache_addr(addr) (false)
105 #define bflb_get_no_cache_addr(addr) (addr)
106 #else
107 bool bflb_check_cache_addr(const void *addr);
108 
109 void *bflb_get_no_cache_addr(const void *addr);
110 
111 #endif
112 
113 #ifdef __cplusplus
114 }
115 #endif
116 
117 #endif
void arch_delay_ms(uint32_t cnt)
void * arch_memcpy_fast(void *pdst, const void *psrc, uint32_t n)
void * arch_memset(void *s, uint8_t c, uint32_t n)
int arch_memcmp(const void *s1, const void *s2, uint32_t n)
void * bflb_get_no_cache_addr(const void *addr)
uint32_t * arch_memcpy4(uint32_t *dst, const uint32_t *src, uint32_t n)
uint32_t * arch_memset4(uint32_t *dst, const uint32_t val, uint32_t n)
void arch_delay_us(uint32_t cnt)
void * arch_memcpy(void *dst, const void *src, uint32_t n)
uint32_t bflb_soft_crc32(void *in, uint32_t len)
bool bflb_check_cache_addr(const void *addr)
uint16_t bflb_soft_crc16(void *in, uint32_t len)