/nrf52832-nimble/rt-thread/libcpu/c-sky/common/ |
H A D | csi_simd.h | 2 * Copyright (C) 2017 C-SKY Microsystems Co., Ltd. All rights reserved. 8 * http://www.apache.org/licenses/LICENSE-2.0 31 The second argument can be left-shifted before extraction of the halfword. 32 \param [in] val1 first 16-bit operands 33 \param [in] val2 second 16-bit operands 34 \param [in] val3 value for left-shifting val2. Value range [0..31]. 47 of val2 right-shifted with the val3. 49 The second argument can be right-shifted before extraction of the halfword. 50 \param [in] val1 first 16-bit operands 51 \param [in] val2 second 16-bit operands [all …]
|
H A D | csi_instr.h | 2 * Copyright (C) 2017 C-SKY Microsystems Co., Ltd. All rights reserved. 8 * http://www.apache.org/licenses/LICENSE-2.0 112 \brief Reverse byte order (32 bit) 113 \details Reverses the byte order in integer value. 124 \brief Reverse byte order (16 bit) 125 \details Reverses the byte order in two unsigned short values. 135 result = ((value & 0xFF000000) >> 8) | ((value & 0x00FF0000) << 8) | in __REV16() 136 ((value & 0x0000FF00) >> 8) | ((value & 0x000000FF) << 8); in __REV16() 143 \brief Reverse byte order in signed short value 144 \details Reverses the byte order in a signed short value with sign extension to integer. [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-1.4.1/src/core/ |
H A D | def.c | 8 * Copyright (c) 2001-2004 Swedish Institute of Computer Science. 43 * These are reference implementations of the byte swapping functions. 45 * Byte swapping is the second thing you would want to optimize. You will 58 * Convert an u16_t from host- to network byte order. 60 * @param n u16_t in host byte order 61 * @return n in network byte order 66 return ((n & 0xff) << 8) | ((n & 0xff00) >> 8); in lwip_htons() 70 * Convert an u16_t from network- to host byte order. 72 * @param n u16_t in network byte order 73 * @return n in host byte order [all …]
|
/nrf52832-nimble/packages/NimBLE-latest/ext/tinycrypt/include/tinycrypt/ |
H A D | ccm_mode.h | 1 /* ccm_mode.h - TinyCrypt interface to a CCM mode implementation */ 9 * - Redistributions of source code must retain the above copyright notice, 12 * - Redistributions in binary form must reproduce the above copyright 16 * - Neither the name of Intel Corporation nor the names of its contributors 37 * Overview: CCM (for "Counter with CBC-MAC") mode is a NIST approved mode of 38 * operation defined in SP 800-38C. 42 * 1) Both non-empty payload and associated data (it encrypts and 45 * 2) Non-empty payload and empty associated data (it encrypts and 47 * 3) Non-empty associated data and empty payload (it degenerates to 51 * between 0 and (2^16 - 2^8) bytes. [all …]
|
/nrf52832-nimble/rt-thread/components/drivers/spi/ |
H A D | spi_wifi_rw009.h | 2 * COPYRIGHT (C) 2018, Real-Thread Information Technology Ltd 4 * SPDX-License-Identifier: Apache-2.0 8 * 2014-07-31 aozima the first version 9 * 2014-09-18 aozima update command & response. 17 // little-endian 31 // little-endian 81 uint8_t bssid[8]; // 6byte + 2byte PAD. 95 uint8_t mac[8]; // 6byte + 2byte PAD. 108 uint8_t bssid[8]; // 6byte + 2byte PAD. 114 uint8_t bssid[8]; // 6byte + 2byte PAD. [all …]
|
H A D | spi_flash_gd.c | 2 * Copyright (c) 2006-2018, RT-Thread Development Team 4 * SPDX-License-Identifier: Apache-2.0 8 * 2015-10-11 fullhan copy from winbond flash 38 #define CMD_RDSR1 (0x05) /* Read Status Register-1 */ 42 #define CMD_RDSR2 (0x35) /* Read Status Register-2 */ 54 rt_mutex_take(&flash_device->lock, RT_WAITING_FOREVER); in flash_lock() 59 rt_mutex_release(&flash_device->lock); in flash_unlock() 72 /** \brief read [size] byte from [offset] to [buffer] 74 * \param offset uint32_t unit : byte 76 * \param size uint32_t unit : byte [all …]
|
H A D | spi_flash_w25qxx.c | 2 * Copyright (c) 2006-2018, RT-Thread Development Team 4 * SPDX-License-Identifier: Apache-2.0 8 * 2011-12-16 aozima the first version 9 * 2012-05-06 aozima can page write. 10 * 2012-08-23 aozima add flash lock. 11 * 2012-08-24 aozima fixed write status register BUG. 49 #define CMD_RDSR1 (0x05) /* Read Status Register-1 */ 53 #define CMD_RDSR2 (0x35) /* Read Status Register-2 */ 65 rt_mutex_take(&flash_device->lock, RT_WAITING_FOREVER); in flash_lock() 70 rt_mutex_release(&flash_device->lock); in flash_unlock() [all …]
|
H A D | qspi_core.c | 2 * Copyright (c) 2006-2018, RT-Thread Development Team 4 * SPDX-License-Identifier: Apache-2.0 8 * 2018-11-16 zylx first version. 22 qspi_device->config.parent.mode = cfg->parent.mode; in rt_qspi_configure() 23 qspi_device->config.parent.max_hz = cfg->parent.max_hz; in rt_qspi_configure() 24 qspi_device->config.parent.data_width = cfg->parent.data_width; in rt_qspi_configure() 25 qspi_device->config.parent.reserved = cfg->parent.reserved; in rt_qspi_configure() 26 qspi_device->config.medium_size = cfg->medium_size; in rt_qspi_configure() 27 qspi_device->config.ddr_mode = cfg->ddr_mode; in rt_qspi_configure() 28 qspi_device->config.qspi_dl_width = cfg->qspi_dl_width; in rt_qspi_configure() [all …]
|
/nrf52832-nimble/packages/NimBLE-latest/nimble/controller/include/controller/ |
H A D | ble_ll_ctrl.h | 10 * http://www.apache.org/licenses/LICENSE-2.0 40 #define BLE_LL_CTRL_PROC_DATA_LEN_UPD (8) 46 #define IS_PENDING_CTRL_PROC(sm, proc) (sm->pending_ctrl_procs & (1 << proc)) 47 #define CLR_PENDING_CTRL_PROC(sm, proc) (sm->pending_ctrl_procs &= ~(1 << proc)) 54 * -> Opcode (1 byte) 55 * -> Data (0 - 26 bytes) 65 #define BLE_LL_CTRL_FEATURE_REQ (8) 115 * -> error code (1 byte) 122 uint8_t rand[8]; 124 uint8_t skdm[8]; [all …]
|
/nrf52832-nimble/rt-thread/components/dfs/filesystems/elmfat/ |
H A D | ff.c | 1 /*----------------------------------------------------------------------------/ 2 / FatFs - Generic FAT file system module R0.12b / 3 /-----------------------------------------------------------------------------/ 18 /----------------------------------------------------------------------------*/ 25 /*-------------------------------------------------------------------------- 29 ---------------------------------------------------------------------------*/ 36 #define ABORT(fs, res) { fp->err = (BYTE)(res); LEAVE_FF(fs, res); } 42 #error Static LFN work area cannot be used at thread-safe configuration 60 #define SS(fs) ((fs)->ssize) /* Variable sector size */ 69 #define GET_FATTIME() ((DWORD)(_NORTC_YEAR - 1980) << 25 | (DWORD)_NORTC_MON << 21 | (DWORD)_NORTC_… [all …]
|
/nrf52832-nimble/rt-thread/components/CMSIS/Include/ |
H A D | core_cmInstr.h | 3 * @brief CMSIS Cortex-M Core Instruction Access Header File 10 /* Copyright (c) 2009 - 2013 ARM LIMITED 15 - Redistributions of source code must retain the above copyright 17 - Redistributions in binary form must reproduce the above copyright 20 - Neither the name of ARM nor the names of its contributors may be used 35 ---------------------------------------------------------------------------*/ 48 #if defined ( __CC_ARM ) /*------------------RealView Compiler -----------------*/ 74 a low-power state until one of a number of events occurs. 111 /** \brief Reverse byte order (32 bit) 113 This function reverses the byte order in integer value. [all …]
|
/nrf52832-nimble/rt-thread/components/utilities/zmodem/ |
H A D | zdef.h | 7 #define ZDLE 030 /* ctrl-X ZMODEM escape - `ala BISYNC DLE */ 9 #define ZBIN 'A' /* binary frame indicator (CRC-16) */ 13 #define ZVBIN 'a' /* binary frame indicator (CRC-16) */ 29 #define ZFIN 8 /* finish session */ 50 /* -1 is general error, -2 is timeout */ 52 #define GOTCRCE (ZCRCE|GOTOR) /* ZDLE-ZCRCE received */ 53 #define GOTCRCG (ZCRCG|GOTOR) /* ZDLE-ZCRCG received */ 54 #define GOTCRCQ (ZCRCQ|GOTOR) /* ZDLE-ZCRCQ received */ 55 #define GOTCRCW (ZCRCW|GOTOR) /* ZDLE-ZCRCW received */ 58 /* Byte positions within header array */ [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-1.4.1/src/core/ipv6/ |
H A D | inet6.c | 4 * byte order functions. 9 * Copyright (c) 2001-2004 Swedish Institute of Computer Science. 47 * Sums up all 16 bit words in a memory portion. Also includes any odd byte. 61 for(acc = 0; len > 1; len -= 2) { in chksum() 65 /* add up any odd byte */ in chksum() 67 acc += htons((u16_t)(*(u8_t *)dataptr) << 8); in chksum() 90 for(q = p; q != NULL; q = q->next) { in inet_chksum_pseudo() 91 acc += chksum(q->payload, q->len); in inet_chksum_pseudo() 95 if (q->len % 2 != 0) { in inet_chksum_pseudo() 96 swapped = 1 - swapped; in inet_chksum_pseudo() [all …]
|
/nrf52832-nimble/rt-thread/components/dfs/filesystems/jffs2/cyg/compress/src/ |
H A D | deflate.c | 1 /* deflate.c -- compress data using the deflation algorithm 2 * Copyright (C) 1995-2005 Jean-loup Gailly. 23 * A similar algorithm is used in comic (by Jan-Mark Wams) and freeze 33 * The idea of lazy evaluation of matches is due to Jan-Mark Wams, and 43 * "Algorithms" by R. Sedgewick, Addison-Wesley, p252. 46 * Data Compression with Finite Windows, Comm.ACM, 32,4 (1989) 490-595 55 " deflate 1.2.3 Copyright 1995-2005 Jean-loup Gailly "; 135 /* 1 */ {4, 4, 8, 4, deflate_fast}}; /* max speed, no lazy matches */ 140 /* 1 */ {4, 4, 8, 4, deflate_fast}, /* max speed, no lazy matches */ 141 /* 2 */ {4, 5, 16, 8, deflate_fast}, [all …]
|
/nrf52832-nimble/rt-thread/components/dfs/filesystems/jffs2/cyg/compress/ |
H A D | zconf.h | 1 /* zconf.h -- configuration of the zlib compression library 2 * Copyright (C) 1995-2005 Jean-loup Gailly. 39 * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. 76 # define Byte z_Byte macro 111 * Compile with -DMAXSEG_64K if the alloc function cannot allocate more 112 * than 64k bytes at a time (needed on systems with 16-bit int). 162 # define MAX_MEM_LEVEL 8 179 that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) 182 make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" 287 typedef unsigned char Byte; /* 8 bits */ typedef [all …]
|
/nrf52832-nimble/rt-thread/components/dfs/filesystems/jffs2/cyg/compress/include/ |
H A D | zconf.h | 1 /* zconf.h -- configuration of the zlib compression library 2 * Copyright (C) 1995-2005 Jean-loup Gailly. 30 * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. 67 # define Byte z_Byte macro 102 * Compile with -DMAXSEG_64K if the alloc function cannot allocate more 103 * than 64k bytes at a time (needed on systems with 16-bit int). 153 # define MAX_MEM_LEVEL 8 170 that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) 173 make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" 278 typedef unsigned char Byte; /* 8 bits */ typedef [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.1.0/src/netif/ |
H A D | lowpan6_common.c | 4 …* Common 6LowPAN routines for IPv6. Uses ND tables for link-layer addressing. Fragments packets to… 6 * This implementation aims to conform to IEEE 802.15.4(-2015), RFC 4944 and RFC 6282. 67 if (mac_addr->addr_len == 2) { in lowpan6_get_address_mode() 68 if ((ip6addr->addr[2] == (u32_t)PP_HTONL(0x000000ff)) && in lowpan6_get_address_mode() 69 ((ip6addr->addr[3] & PP_HTONL(0xffff0000)) == PP_NTOHL(0xfe000000))) { in lowpan6_get_address_mode() 70 …if ((ip6addr->addr[3] & PP_HTONL(0x0000ffff)) == lwip_ntohl((mac_addr->addr[0] << 8) | mac_addr->… in lowpan6_get_address_mode() 74 } else if (mac_addr->addr_len == 8) { in lowpan6_get_address_mode() 75 …if ((ip6addr->addr[2] == lwip_ntohl(((mac_addr->addr[0] ^ 2) << 24) | (mac_addr->addr[1] << 16) | … in lowpan6_get_address_mode() 76 …(ip6addr->addr[3] == lwip_ntohl((mac_addr->addr[4] << 24) | (mac_addr->addr[5] << 16) | mac_addr->… in lowpan6_get_address_mode() 81 if ((ip6addr->addr[2] == PP_HTONL(0x000000ffUL)) && in lowpan6_get_address_mode() [all …]
|
/nrf52832-nimble/rt-thread/components/dfs/filesystems/jffs2/src/ |
H A D | compr_rubin.c | 2 * JFFS2 -- Journalling Flash File System, Version 2. 26 rs->q = 0; in init_rubin() 27 rs->p = (long) (2 * UPPER_BIT_RUBIN); in init_rubin() 28 rs->bit_number = (long) 0; in init_rubin() 29 rs->bit_divider = div; in init_rubin() 30 for (c=0; c<8; c++) in init_rubin() 31 rs->bits[c] = bits[c]; in init_rubin() 41 while ((rs->q >= UPPER_BIT_RUBIN) || ((rs->p + rs->q) <= UPPER_BIT_RUBIN)) { in encode() 42 rs->bit_number++; in encode() 44 ret = pushbit(&rs->pp, (rs->q & UPPER_BIT_RUBIN) ? 1 : 0, 0); in encode() [all …]
|
/nrf52832-nimble/rt-thread/components/dfs/filesystems/uffs/src/uffs/ |
H A D | uffs_ecc.c | 2 This file is part of UFFS, the Ultra-low-cost Flash File System. 4 Copyright (C) 2005-2009 Ricky Zheng <[email protected]> 19 Boston, MA 02110-1301, USA. 60 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 125 if (b & 0x01) { // odd number of bits in the byte in uffs_EccMakeChunk256() 132 // Byte[0] P64 | P64' | P32 | P32' | P16 | P16' | P8 | P8' in uffs_EccMakeChunk256() 133 // Byte[1] P1024 | P1024' | P512 | P512' | P256 | P256' | P128 | P128' in uffs_EccMakeChunk256() 134 // Byte[2] P4 | P4' | P2 | P2' | P1 | P1' | 1 | 1 in uffs_EccMakeChunk256() 148 * \param[in] data_len length of data in byte 151 * \return length of ECC in byte. (3 bytes ECC per 256 data) [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.1.0/src/include/netif/ppp/polarssl/ |
H A D | des.h | 4 * Based on XySSL: Copyright (C) 2006-2008 Christophe Devine 60 * \brief DES key schedule (56-bit, encryption) 63 * \param key 8-byte secret key 65 void des_setkey_enc( des_context *ctx, unsigned char key[8] ); 68 * \brief DES key schedule (56-bit, decryption) 71 * \param key 8-byte secret key 73 void des_setkey_dec( des_context *ctx, unsigned char key[8] ); 76 * \brief DES-ECB block encryption/decryption 79 * \param input 64-bit input block 80 * \param output 64-bit output block [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.0.2/src/include/netif/ppp/polarssl/ |
H A D | des.h | 4 * Based on XySSL: Copyright (C) 2006-2008 Christophe Devine 60 * \brief DES key schedule (56-bit, encryption) 63 * \param key 8-byte secret key 65 void des_setkey_enc( des_context *ctx, unsigned char key[8] ); 68 * \brief DES key schedule (56-bit, decryption) 71 * \param key 8-byte secret key 73 void des_setkey_dec( des_context *ctx, unsigned char key[8] ); 76 * \brief DES-ECB block encryption/decryption 79 * \param input 64-bit input block 80 * \param output 64-bit output block [all …]
|
/nrf52832-nimble/rt-thread/components/net/freemodbus/modbus/functions/ |
H A D | mbfuncholding.c | 31 /* ----------------------- System includes ----------------------------------*/ 35 /* ----------------------- Platform includes --------------------------------*/ 38 /* ----------------------- Modbus includes ----------------------------------*/ 44 /* ----------------------- Defines ------------------------------------------*/ 65 #define MB_PDU_FUNC_READWRITE_BYTECNT_OFF ( MB_PDU_DATA_OFF + 8 ) 69 /* ----------------------- Static functions ---------------------------------*/ 72 /* ----------------------- Start implementation -----------------------------*/ 85 usRegAddress = ( USHORT )( pucFrame[MB_PDU_FUNC_WRITE_ADDR_OFF] << 8 ); in eMBFuncWriteHoldingRegister() 121 usRegAddress = ( USHORT )( pucFrame[MB_PDU_FUNC_WRITE_MUL_ADDR_OFF] << 8 ); in eMBFuncWriteMultipleHoldingRegister() 125 usRegCount = ( USHORT )( pucFrame[MB_PDU_FUNC_WRITE_MUL_REGCNT_OFF] << 8 ); in eMBFuncWriteMultipleHoldingRegister() [all …]
|
H A D | mbutils.c | 31 /* ----------------------- System includes ----------------------------------*/ 35 /* ----------------------- Platform includes --------------------------------*/ 38 /* ----------------------- Modbus includes ----------------------------------*/ 42 /* ----------------------- Defines ------------------------------------------*/ 43 #define BITS_UCHAR 8U 45 /* ----------------------- Start implementation -----------------------------*/ 56 RT_ASSERT( ucNBits <= 8 ); in xMBUtilSetBits() 57 RT_ASSERT( ( size_t )BITS_UCHAR == sizeof( UCHAR ) * 8 ); in xMBUtilSetBits() 59 /* Calculate byte offset for first byte containing the bit values starting in xMBUtilSetBits() 64 usNPreBits = ( USHORT )( usBitOffset - usByteOffset * BITS_UCHAR ); in xMBUtilSetBits() [all …]
|
/nrf52832-nimble/rt-thread/components/net/uip/uip/ |
H A D | uip.h | 20 * Copyright (c) 2001-2003, Adam Dunkels. 63 typedef u16_t uip_ip6addr_t[8]; 70 /*---------------------------------------------------------------------------*/ 80 * The uIP configuration functions are used for setting run-time 87 * The IP address is represented as a 4-byte array where the first 88 * octet of the IP address is put in the first member of the 4-byte 111 * The IP address is represented as a 4-byte array where the first 112 * octet of the IP address is put in the first member of the 4-byte 240 if(BUF->type == HTONS(UIP_ETHTYPE_IP)) { 247 } else if(BUF->type == HTONS(UIP_ETHTYPE_ARP)) { [all …]
|
/nrf52832-nimble/packages/NimBLE-latest/nimble/host/test/src/ |
H A D | ble_gatt_read_test.c | 10 * http://www.apache.org/licenses/LICENSE-2.0 71 if (error->status != 0) { in ble_gatt_read_test_cb() 73 ble_gatt_read_test_bad_status = error->status; in ble_gatt_read_test_cb() 87 TEST_ASSERT_FATAL(OS_MBUF_PKTLEN(attr->om) <= sizeof dst->value); in ble_gatt_read_test_cb() 89 dst->conn_handle = conn_handle; in ble_gatt_read_test_cb() 90 dst->handle = attr->handle; in ble_gatt_read_test_cb() 91 dst->value_len = OS_MBUF_PKTLEN(attr->om); in ble_gatt_read_test_cb() 92 rc = os_mbuf_copydata(attr->om, 0, OS_MBUF_PKTLEN(attr->om), dst->value); in ble_gatt_read_test_cb() 96 (*stop_after)--; in ble_gatt_read_test_cb() 121 if (error->status != 0) { in ble_gatt_read_test_long_cb() [all …]
|