/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. 45 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 46 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 47 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 48 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 49 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 50 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 51 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, [all …]
|
/nrf52832-nimble/rt-thread/components/net/uip/uip/ |
H A D | uip.h | 20 * Copyright (c) 2001-2003, Adam Dunkels. 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)) { 414 hwsend(&uip_buf[UIP_LLH_LEN], uip_len - UIP_LLH_LEN); [all …]
|
/nrf52832-nimble/rt-thread/components/dfs/filesystems/elmfat/ |
H A D | diskio.h | 1 /*-----------------------------------------------------------------------/ 3 /-----------------------------------------------------------------------*/ 16 typedef BYTE DSTATUS; 24 RES_PARERR /* 4: Invalid Parameter */ 28 /*---------------------------------------*/ 32 DSTATUS disk_initialize (BYTE pdrv); 33 DSTATUS disk_status (BYTE pdrv); 34 DRESULT disk_read (BYTE pdrv, BYTE* buff, DWORD sector, UINT count); 35 DRESULT disk_write (BYTE pdrv, const BYTE* buff, DWORD sector, UINT count); 36 DRESULT disk_ioctl (BYTE pdrv, BYTE cmd, void* buff); [all …]
|
H A D | ff.h | 1 /*----------------------------------------------------------------------------/ 2 / FatFs - Generic FAT file system module R0.12b / 3 /-----------------------------------------------------------------------------/ 18 /----------------------------------------------------------------------------*/ 42 BYTE pd; /* Physical drive number */ 43 BYTE pt; /* Partition: 0:Auto detect, 1-4:Forced partition) */ 45 extern PARTITION VolToPart[]; /* Volume - Partition resolution table */ 50 #define LD2PD(vol) (BYTE)(vol) /* Each logical drive is bound to the same physical drive number */ 59 #if _LFN_UNICODE /* Unicode (UTF-16) string */ 61 #error _LFN_UNICODE must be 0 at non-LFN cfg. [all …]
|
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 …]
|
H A D | dfs_elm.c | 2 * Copyright (c) 2006-2018, RT-Thread Development Team 4 * SPDX-License-Identifier: Apache-2.0 8 * 2008-02-22 QiuYi The first version. 9 * 2011-10-08 Bernard fixed the block size in statfs. 10 * 2011-11-23 Bernard fixed the rename issue. 11 * 2012-07-26 aozima implement ff_memalloc and ff_memfree. 12 * 2012-12-19 Bernard fixed the O_APPEND and lseek issue. 13 * 2013-03-01 aozima fixed the stat(st_mtime) issue. 14 * 2014-01-26 Bernard Check the sector size before mount. 15 * 2017-02-13 Hichard Update Fatfs version to 0.12b, support exFAT. [all …]
|
/nrf52832-nimble/rt-thread/components/drivers/spi/ |
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 */ 41 #define CMD_ERASE_4K (0x20) /* Sector Erase:4K */ 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 [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 */ 52 #define CMD_ERASE_4K (0x20) /* Sector Erase:4K */ 53 #define CMD_RDSR2 (0x35) /* Read Status Register-2 */ 65 rt_mutex_take(&flash_device->lock, RT_WAITING_FOREVER); in flash_lock() [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 …]
|
H A D | spi_flash_sst25vfxx.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 28 #define MC_ID_SST25VF040B (0x8D) /* 4Mbit */ 58 return rt_spi_sendrecv8(spi_flash->rt_spi_device, CMD_RDSR); in sst25vfxx_read_status() 68 * \param page uint32_t unit : byte (4096 * N,1 page = 4096byte) 70 * \param size uint32_t unit : byte ( 4096*N ) 80 page &= ~0xFFF; // page size = 4096byte in sst25vfxx_page_write() 83 rt_spi_send(spi_flash->rt_spi_device, send_buffer, 1); in sst25vfxx_page_write() 89 rt_spi_send(spi_flash->rt_spi_device, send_buffer, 4); in sst25vfxx_page_write() [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) */ 25 #define ZFILE 4 /* file name from sender */ 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/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/packages/NimBLE-latest/nimble/host/test/src/ |
H A D | ble_hs_hci_test.c | 10 * http://www.apache.org/licenses/LICENSE-2.0 59 params[2] = -8; in TEST_CASE() 65 TEST_ASSERT(rssi == -8); in TEST_CASE() 76 ble_hs_test_util_hci_ack_set_params(opcode, 0, params, sizeof params - 1); in TEST_CASE() 90 uint8_t peer_addr[6] = { 1, 2, 3, 4, 5, 6 }; in TEST_CASE() 102 /* The controller has room for five 20-byte payloads (+ 4-byte header). */ in TEST_CASE() 112 /* Send two 3-byte data packets. */ in TEST_CASE() 126 /* Receive a number-of-completed-packets event. Ensure available buffer in TEST_CASE() 132 TEST_ASSERT_FATAL(ble_hs_hci_avail_pkts == 4); in TEST_CASE() 144 /* Receive number-of-completed-packets: 5. */ in TEST_CASE() [all …]
|
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 …]
|
/nrf52832-nimble/rt-thread/components/net/freemodbus/modbus/tcp/ |
H A D | mbtcp.c | 31 /* ----------------------- System includes ----------------------------------*/ 35 /* ----------------------- Platform includes --------------------------------*/ 38 /* ----------------------- Modbus includes ----------------------------------*/ 47 /* ----------------------- Defines ------------------------------------------*/ 49 /* ----------------------- MBAP Header --------------------------------------*/ 52 * <------------------------ MODBUS TCP/IP ADU(1) -------------------------> 53 * <----------- MODBUS PDU (1') ----------------> 54 * +-----------+---------------+------------------------------------------+ 56 * +-----------+---------------+------------------------------------------+ 58 * (2) (3) (4) (5) (6) [all …]
|
/nrf52832-nimble/rt-thread/components/drivers/spi/sfud/src/ |
H A D | sfud_sfdp.c | 30 * Created on: 2016-05-26 38 …* DWORD: Four consecutive 8-bit bytes used as the basic 32-bit building block for headers and para… 40 …* Sector: The minimum granularity - size and alignment - of an area that can be erased in the data… 49 /* the JEDEC basic flash parameter table length is 9 DWORDs (288-bit) on JESD216 (V1.0) initial rel… 61 … uint32_t ptp; /**< Parameter table 24bit pointer (byte address) */ 88 …g: Read SFDP parameter header information failed. The %s is not support JEDEC SFDP.", flash->name); in sfud_read_sfdp() 101 sfud_sfdp *sfdp = &flash->sfdp; in read_sfdp_header() 106 /* each parameter header being 2 DWORDs (64-bit) */ in read_sfdp_header() 107 uint8_t header[2 * 4] = { 0 }; in read_sfdp_header() 111 sfdp->available = false; in read_sfdp_header() [all …]
|
H A D | sfud.c | 4 * Copyright (c) 2016-2018, Armink, <[email protected]> 26 * Created on: 2016-04-23 58 QUAD_IO = 1 << 4, /**< qspi fast read quad input/output */ 97 flash->init_ok = true; in sfud_device_init() 98 SFUD_INFO("%s flash device is initialize success.", flash->name); in sfud_device_init() 100 flash->init_ok = false; in sfud_device_init() 101 SFUD_INFO("Error: %s flash device is initialize fail.", flash->name); in sfud_device_init() 168 /* if medium size greater than 16Mb, use 4-Byte address, instruction should be added one */ in qspi_set_read_cmd_format() 169 if (flash->chip.capacity <= 0x1000000) { in qspi_set_read_cmd_format() 170 flash->read_cmd_format.instruction = ins; in qspi_set_read_cmd_format() [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 36 #define BLE_LL_CTRL_PROC_VERSION_XCHG (4) 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) 61 #define BLE_LL_CTRL_ENC_RSP (4) 115 * -> error code (1 byte) 147 * -> 1 byte which contains the unknown or un-supported opcode. 153 * -> 8 bytes of data containing features supported by device. [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/packages/NimBLE-latest/nimble/include/nimble/ |
H A D | hci_common.h | 10 * http://www.apache.org/licenses/LICENSE-2.0 33 * -> Opcode group field & Opcode command field (2) 34 * -> Parameter Length (1) 173 /* --- Disconnect command (OGF 0x01, OCF 0x0006) --- */ 176 /* --- Set event mask (OGF 0x03, OCF 0x0001 --- */ 179 /* --- Set controller to host flow control (OGF 0x03, OCF 0x0031) --- */ 187 /* --- Host buffer size (OGF 0x03, OCF 0x0033) --- */ 190 /* --- Host number of completed packets (OGF 0x03, OCF 0x0035) --- */ 192 #define BLE_HCI_HOST_NUM_COMP_PKTS_ENT_LEN (4) 194 /* --- Read BD_ADDR (OGF 0x04, OCF 0x0009 --- */ [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/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 …]
|
H A D | lowpan6.c | 4 …* 6LowPAN output for IPv6. Uses ND tables for link-layer addressing. Fragments packets to 6LowPAN … 6 * This implementation aims to conform to IEEE 802.15.4(-2015), RFC 4944 and RFC 6282. 75 * (IEEE 802.15.4 limits to 127 bytes) 87 /** This struct keeps track of per-netif state */ 97 /** local PAN ID for IEEE 802.15.4 header */ 99 /** Sequence Number for IEEE 802.15.4 transmission */ 104 #define LOWPAN6_MAX_PAYLOAD (127 - 2) 121 /* IEEE 802.15.4 specific functions: */ 123 /** Write the IEEE 802.15.4 header that encapsulates the 6LoWPAN frame. 143 if (dst->addr_len == 2) { in lowpan6_write_iee802154_header() [all …]
|
/nrf52832-nimble/rt-thread/components/drivers/spi/sfud/inc/ |
H A D | sfud_def.h | 4 * Copyright (c) 2016-2018, Armink, <[email protected]> 26 * Created on: 2016-04-23 78 else {if (__delay_temp) {__delay_temp();} retry --;} 179 #define SFUD_SFDP_ERASE_TYPE_MAX_NUM 4 198 SFUD_ERR_TIMEOUT = 4, /**< timeout error */ 229 …uint8_t erase_4k; /**< 4 kilobyte erase is supported throughout the dev… 230 uint8_t erase_4k_cmd; /**< 4 Kilobyte erase command */ 231 bool sr_is_non_vola; /**< status register is supports non-volatile */ 233 bool addr_3_byte; /**< supports 3-Byte addressing */ 234 bool addr_4_byte; /**< supports 4-Byte addressing */ [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 ------------------------------------------*/ 47 #define MB_PDU_FUNC_READ_SIZE ( 4 ) 52 #define MB_PDU_FUNC_WRITE_SIZE ( 4 ) 56 #define MB_PDU_FUNC_WRITE_MUL_BYTECNT_OFF ( MB_PDU_DATA_OFF + 4 ) 63 #define MB_PDU_FUNC_READWRITE_WRITE_ADDR_OFF ( MB_PDU_DATA_OFF + 4 ) 69 /* ----------------------- Static functions ---------------------------------*/ 72 /* ----------------------- Start implementation -----------------------------*/ [all …]
|