add big_endian_store_24

This commit is contained in:
Milanka Ringwald 2017-02-01 00:06:12 +01:00 committed by Matthias Ringwald
parent 4217b63bd9
commit 7f535380ac
2 changed files with 7 additions and 0 deletions

View File

@ -104,6 +104,12 @@ void big_endian_store_16(uint8_t *buffer, uint16_t pos, uint16_t value){
buffer[pos++] = value;
}
void big_endian_store_24(uint8_t *buffer, uint16_t pos, uint32_t value){
buffer[pos++] = value >> 16;
buffer[pos++] = value >> 8;
buffer[pos++] = value;
}
void big_endian_store_32(uint8_t *buffer, uint16_t pos, uint32_t value){
buffer[pos++] = value >> 24;
buffer[pos++] = value >> 16;

View File

@ -126,6 +126,7 @@ uint32_t big_endian_read_32( const uint8_t * buffer, int pos);
* @param value
*/
void big_endian_store_16(uint8_t *buffer, uint16_t pos, uint16_t value);
void big_endian_store_24(uint8_t *buffer, uint16_t pos, uint32_t value);
void big_endian_store_32(uint8_t *buffer, uint16_t pos, uint32_t value);