ex
Fork of mbed-os-example-mbed5-blinky by
Embed:
(wiki syntax)
Show/hide line numbers
baidu_ca_util_network.h
00001 // Copyright 2017 Baidu Inc. All Rights Reserved. 00002 // Author: Su Hao (suhao@baidu.com) 00003 // 00004 // Description: Network util tools. 00005 00006 #ifndef BAIDU_IOT_TINYDU_IOT_OS_SRC_IOT_BAIDU_CA_SOURCE_BAIDU_CA_UTIL_NETWORK_H 00007 #define BAIDU_IOT_TINYDU_IOT_OS_SRC_IOT_BAIDU_CA_SOURCE_BAIDU_CA_UTIL_NETWORK_H 00008 00009 #include "baidu_ca_types.h" 00010 00011 /* 00012 * Determine whether the system byte order is little endian 00013 * 00014 * @Return bca_ut_t, if big endian return 0, else return 1. 00015 */ 00016 BCA_INT bca_u8_t bca_is_little_endian(void); 00017 00018 /* 00019 * Convert the byte order from host to network for 16bit value 00020 * 00021 * @Param value, in, the host value 00022 * @Param bca_u16_t, the network result 00023 */ 00024 BCA_INT bca_u16_t bca_htons(bca_u16_t value); 00025 00026 /* 00027 * Convert the byte order from host to network for 32bit value 00028 * 00029 * @Param value, in, the host value 00030 * @Param bca_u32_t, the network result 00031 */ 00032 BCA_INT bca_u32_t bca_htonl(bca_u32_t value); 00033 00034 #endif // BAIDU_IOT_TINYDU_IOT_OS_SRC_IOT_BAIDU_CA_SOURCE_BAIDU_CA_UTIL_NETWORK_H
Generated on Tue Jul 12 2022 16:28:52 by
1.7.2
