mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-12 15:47:14 +00:00
add bzero for embedded targets
This commit is contained in:
parent
65793526c2
commit
866d626ba4
@ -100,3 +100,7 @@ uint8_t crc8_calc(uint8_t *data, uint16_t len);
|
||||
|
||||
#define BD_ADDR_CMP(a,b) memcmp(a,b, BD_ADDR_LEN)
|
||||
#define BD_ADDR_COPY(dest,src) memcpy(dest,src,BD_ADDR_LEN)
|
||||
|
||||
#ifdef EMBEDDED
|
||||
void bzero(void *s, uint32_t n);
|
||||
#endif
|
||||
|
@ -41,6 +41,7 @@
|
||||
|
||||
#include <btstack/sdp_util.h>
|
||||
#include "../config.h"
|
||||
#include <btstack/utils.h> // for bzero on embedded
|
||||
#include "hci.h"
|
||||
|
||||
// calculate combined ogf/ocf value
|
||||
|
@ -176,3 +176,12 @@ uint8_t crc8_calc(uint8_t *data, uint16_t len)
|
||||
/* Ones complement */
|
||||
return 0xFF - crc8(data, len);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
// ad-hoc implemenation for embedded targets
|
||||
void bzero(void *s, uint32_t n){
|
||||
uint8_t * data = (uint8_t *) s;
|
||||
while (n--){
|
||||
*data++ = 0;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user