/nrf52832-nimble/rt-thread/components/drivers/serial/ |
H A D | serial.c | 14 * 2014-07-10 bernard rewrite serial framework 19 * 2016-05-10 armink add fifo mode to DMA rx when serial->config.bufsz != 0. 20 * 2017-01-19 aubr.cool prevent change serial rx bufsz when serial is opened. 61 /* fops for serial */ 164 struct rt_serial_device *serial; in serial_fops_poll() local 169 serial = (struct rt_serial_device *)device; in serial_fops_poll() 180 rx_fifo = (struct rt_serial_rx_fifo*) serial->serial_rx; in serial_fops_poll() 206 * Serial poll routines 208 rt_inline int _serial_poll_rx(struct rt_serial_device *serial, rt_uint8_t *data, int length) in _serial_poll_rx() argument 213 RT_ASSERT(serial != RT_NULL); in _serial_poll_rx() [all …]
|
/nrf52832-nimble/rt-thread/libcpu/xilinx/microblaze/ |
H A D | serial.c | 2 * File : serial.c 20 #include "serial.h" 52 struct rt_mb_uart_lite* serial = RT_NULL; in rt_hw_serial_isr() local 55 /* serial 1 */ in rt_hw_serial_isr() 56 serial = &serial1; in rt_hw_serial_isr() 58 RT_ASSERT(serial != RT_NULL); in rt_hw_serial_isr() 61 device = (rt_device_t)serial; in rt_hw_serial_isr() 67 status = serial->hw_base->STAT_REG; in rt_hw_serial_isr() 71 serial->rx_buffer[serial->save_index] = serial->hw_base->Rx_FIFO; in rt_hw_serial_isr() 74 serial->save_index ++; in rt_hw_serial_isr() [all …]
|
/nrf52832-nimble/rt-thread/libcpu/arm/AT91SAM7S/ |
H A D | serial.c | 16 #include "serial.h" 77 struct rt_at91serial* serial = RT_NULL; in rt_hw_serial_isr() local 82 /* serial 1 */ in rt_hw_serial_isr() 83 serial = &serial1; in rt_hw_serial_isr() 89 /* serial 2 */ in rt_hw_serial_isr() 90 serial = &serial2; in rt_hw_serial_isr() 93 RT_ASSERT(serial != RT_NULL); in rt_hw_serial_isr() 96 device = (rt_device_t)serial; in rt_hw_serial_isr() 102 serial->rx_buffer[serial->save_index] = serial->hw_base->US_RHR; in rt_hw_serial_isr() 105 serial->save_index ++; in rt_hw_serial_isr() [all …]
|
/nrf52832-nimble/rt-thread/components/net/freemodbus/port/ |
H A D | portserial.c | 32 /* software simulation serial transmit IRQ handler thread stack */ 34 /* software simulation serial transmit IRQ handler thread */ 36 /* serial event */ 38 /* modbus slave serial device */ 39 static rt_serial_t *serial; variable 42 /* serial transmit event */ 62 /* set serial name */ in xMBPortSerialInit() 66 serial = &serial1; in xMBPortSerialInit() 71 serial = &serial2; in xMBPortSerialInit() 76 serial = &serial3; in xMBPortSerialInit() [all …]
|
H A D | portserial_m.c | 33 /* software simulation serial transmit IRQ handler thread stack */ 35 /* software simulation serial transmit IRQ handler thread */ 37 /* serial event */ 39 /* modbus master serial device */ 40 static rt_serial_t *serial; variable 43 /* serial transmit event */ 64 /* set serial name */ in xMBMasterPortSerialInit() 68 serial = &serial1; in xMBMasterPortSerialInit() 73 serial = &serial2; in xMBMasterPortSerialInit() 78 serial = &serial3; in xMBMasterPortSerialInit() [all …]
|
/nrf52832-nimble/drivers/ |
H A D | drv_uart.c | 25 struct rt_serial_device *serial; member 65 rt_hw_serial_isr(working_cfg->serial, RT_SERIAL_EVENT_RX_IND); in UART0_IRQHandler() 71 rt_hw_serial_isr(working_cfg->serial, RT_SERIAL_EVENT_TX_DONE); in UART0_IRQHandler() 76 rt_hw_serial_isr(working_cfg->serial, RT_SERIAL_EVENT_RX_TIMEOUT); in UART0_IRQHandler() 80 static rt_err_t _uart_cfg(struct rt_serial_device *serial, struct serial_configure *cfg) in _uart_cfg() argument 85 RT_ASSERT(serial != RT_NULL); in _uart_cfg() 88 if (serial->parent.user_data != RT_NULL) in _uart_cfg() 90 instance = (UART_CFG_T *)serial->parent.user_data; in _uart_cfg() 152 static rt_err_t _uart_ctrl(struct rt_serial_device *serial, int cmd, void *arg) in _uart_ctrl() argument 156 RT_ASSERT(serial != RT_NULL); in _uart_ctrl() [all …]
|
/nrf52832-nimble/rt-thread/components/dfs/filesystems/uffs/src/inc/uffs/ |
H A D | uffs_tree.h | 69 u16 serial; /* for suspended block list */ member 78 u16 serial; member 86 u16 serial; member 94 u16 serial; member 132 u16 serial; 145 #define ROOT_DIR_SERIAL 0 //!< serial num of root dir 146 #define MAX_UFFS_FSN 0x3ff //!< maximum dir|file serial number (uffs_TagStore#parent: 10 bits) 147 #define MAX_UFFS_FDN 0x3fff //!< maximum file data block serial numbers (uffs_TagStore#serial: 14… 149 #define INVALID_UFFS_SERIAL 0xffff //!< invalid serial num 163 #define GET_FILE_HASH(serial) (serial & FILE_NODE_HASH_MASK) argument [all …]
|
H A D | uffs_buf.h | 69 u16 parent; //!< parent serial 70 u16 serial; //!< serial member 89 uffs_Buf * uffs_BufGet(struct uffs_DeviceSt *dev, u16 parent, u16 serial, u16 page_id); 93 uffs_Buf *uffs_BufNew(struct uffs_DeviceSt *dev, u8 type, u16 parent, u16 serial, u16 page_id); 96 uffs_Buf * uffs_BufFind(uffs_Device *dev, u16 parent, u16 serial, u16 page_id); 100 u16 parent, u16 serial, u16 page_id); 125 URET uffs_BufFlushGroup(struct uffs_DeviceSt *dev, u16 parent, u16 serial); 126 URET uffs_BufFlushGroupEx(struct uffs_DeviceSt *dev, u16 parent, u16 serial, UBOOL force_block_reco… 132 int uffs_BufFindGroupSlot(struct uffs_DeviceSt *dev, u16 parent, u16 serial);
|
/nrf52832-nimble/rt-thread/components/dfs/filesystems/uffs/src/uffs/ |
H A D | uffs_buf.c | 71 buf->parent, buf->serial, in uffs_BufInspect() 201 "can't release buffers, parent:%d, serial:%d, \ in uffs_BufReleaseAll() 203 p->parent, p->serial, p->page_id); in uffs_BufReleaseAll() 437 * \param[in] parent parent serial num 438 * \param[in] serial serial num 443 u16 parent, u16 serial, u16 page_id) in uffs_BufFindFrom() argument 449 p->serial == serial && in uffs_BufFindFrom() 465 * \param[in] parent parent serial num 466 * \param[in] serial serial num 471 u16 parent, u16 serial, u16 page_id) in uffs_BufFind() argument [all …]
|
H A D | uffs_fs.c | 54 (obj)->node->u.dir.serial : (obj)->node->u.file.serial \ 64 ((obj)->node ? GET_OBJ_NODE_SERIAL(obj) : obj->serial) 291 * \param[in] dir object parent dir serial NO. 363 obj->serial = GET_OBJ_NODE_SERIAL(obj); in uffs_CreateObjectEx() 373 obj->serial = uffs_FindFreeFsnSerial(obj->dev); in uffs_CreateObjectEx() 374 if (obj->serial == INVALID_UFFS_SERIAL) { in uffs_CreateObjectEx() 375 uffs_Perror(UFFS_MSG_SERIOUS, "No free serial num!"); in uffs_CreateObjectEx() 387 buf = uffs_BufNew(obj->dev, obj->type, obj->parent, obj->serial, 0); in uffs_CreateObjectEx() 412 uffs_BufFlushGroup(obj->dev, obj->parent, obj->serial); in uffs_CreateObjectEx() 417 obj->node = uffs_TreeFindDirNode(obj->dev, obj->serial); in uffs_CreateObjectEx() [all …]
|
H A D | uffs_tree.c | 176 return node->u.dir.serial; 178 return node->u.file.serial; 180 return node->u.data.serial; 182 uffs_Perror(UFFS_MSG_SERIOUS, "unkown type, X-serial"); 216 * \param[in] parent parent serial num 217 * \param[in] serial serial num 220 u8 type, u16 parent, u16 serial) in uffs_FindFromTree() argument 224 return uffs_TreeFindDirNode(dev, serial); in uffs_FindFromTree() 226 return uffs_TreeFindFileNode(dev, serial); in uffs_FindFromTree() 228 return uffs_TreeFindDataNode(dev, parent, serial); in uffs_FindFromTree() [all …]
|
H A D | uffs_find.c | 74 info->serial = node->u.dir.serial; in _LoadObjectInfo() 78 info->serial = node->u.file.serial; in _LoadObjectInfo() 108 info->serial = obj->serial; in uffs_GetObjectInfo() 144 f->serial = dir->serial; in uffs_FindObjectOpen() 155 * \param[in] dir serial number of the dir to be searched 158 * serial number is not valid. 172 f->serial = dir; in uffs_FindObjectOpenEx() 189 if (node->u.dir.parent == f->serial) { in do_FindObject() 205 if (node->u.dir.parent == f->serial) { in do_FindObject() 226 if (node->u.file.parent == f->serial) { in do_FindObject() [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-1.4.1/src/include/lwip/ |
H A D | sio.h | 31 * This is the interface to the platform specific serial IO module 55 * Opens a serial device for communication. 58 * @return handle to serial device if successful, NULL otherwise 65 * Sends a single character to the serial device. 68 * @param fd serial device handle 77 * Receives a single character from the serial device. 79 * @param fd serial device handle 88 * Reads from the serial device. 90 * @param fd serial device handle 103 * Tries to read from the serial device. Same as sio_read but returns [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.1.0/src/include/lwip/ |
H A D | sio.h | 31 * This is the interface to the platform specific serial IO module 56 * Opens a serial device for communication. 59 * @return handle to serial device if successful, NULL otherwise 66 * Sends a single character to the serial device. 69 * @param fd serial device handle 78 * Receives a single character from the serial device. 80 * @param fd serial device handle 89 * Reads from the serial device. 91 * @param fd serial device handle 104 * Tries to read from the serial device. Same as sio_read but returns [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.0.2/src/include/lwip/ |
H A D | sio.h | 31 * This is the interface to the platform specific serial IO module 56 * Opens a serial device for communication. 59 * @return handle to serial device if successful, NULL otherwise 66 * Sends a single character to the serial device. 69 * @param fd serial device handle 78 * Receives a single character from the serial device. 80 * @param fd serial device handle 89 * Reads from the serial device. 91 * @param fd serial device handle 104 * Tries to read from the serial device. Same as sio_read but returns [all …]
|
/nrf52832-nimble/rt-thread/components/drivers/usb/usbdevice/class/ |
H A D | cdc_vcom.c | 19 #include <drivers/serial.h> 69 struct rt_serial_device serial; member 85 struct rt_serial_device * serial; member 242 "RTT Virtual Serial", 261 /*rt_kprintf("reset USB serial\n", cnt);*/ in _vcom_reset_state() 323 /* ensure serial is active */ in _ep_out_handler() 324 if((data->serial.parent.flag & RT_DEVICE_FLAG_ACTIVATED) in _ep_out_handler() 325 && (data->serial.parent.open_flag & RT_DEVICE_OFLAG_OPEN)) in _ep_out_handler() 334 rt_hw_serial_isr(&data->serial,RT_SERIAL_EVENT_RX_IND); in _ep_out_handler() 650 static rt_err_t _vcom_configure(struct rt_serial_device *serial, in _vcom_configure() argument [all …]
|
/nrf52832-nimble/rt-thread/components/drivers/include/drivers/ |
H A D | serial.h | 107 * Serial FIFO mode 125 * Serial DMA mode 155 rt_err_t (*configure)(struct rt_serial_device *serial, struct serial_configure *cfg); 156 rt_err_t (*control)(struct rt_serial_device *serial, int cmd, void *arg); 158 int (*putc)(struct rt_serial_device *serial, char c); 159 int (*getc)(struct rt_serial_device *serial); 161 …rt_size_t (*dma_transmit)(struct rt_serial_device *serial, rt_uint8_t *buf, rt_size_t size, int di… 164 void rt_hw_serial_isr(struct rt_serial_device *serial, int event); 166 rt_err_t rt_hw_serial_register(struct rt_serial_device *serial,
|
/nrf52832-nimble/rt-thread/components/dfs/filesystems/uffs/src/emu/ |
H A D | uffs_fileem_ecc_hw_auto.c | 49 * Note: the MLC controller strictly require sequencial access to serial data buffer. 71 static u8 g_sdata_buf[PAGE_FULL_SIZE]; // emulating LPC32x0's 528-bytes serial data buffer 82 …if (!uffs_Assert(g_sdata_buf_pointer + len <= sizeof(g_sdata_buf), "BUG: Serial Data Buffer overfl… in feed_sdata() 92 …if (!uffs_Assert(g_sdata_buf_pointer + num <= sizeof(g_sdata_buf), "BUG: Serial Data Buffer overfl… in feed_sdata_constant() 101 …if (!uffs_Assert( (int)sizeof(g_sdata_buf) - g_sdata_buf_pointer >= len, "BUG: Serial Data Buffer … in drain_sdata() 154 // In the real world, MLC controller will generate RS-ECC code in serial data buffer in program_sdata() 160 …if (!uffs_Assert(g_sdata_buf_pointer == PAGE_FULL_SIZE, "Serial Data Buffer is not fully filled !!… in program_sdata() 230 // Copy data to serial data buffer in femu_hw_auto_WritePageWithLayout() 238 // We still need to feed data to serial data buffer to make MLC controller happy in femu_hw_auto_WritePageWithLayout() 255 // feed spare data to serial data buffer in femu_hw_auto_WritePageWithLayout() [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.1.0/src/netif/ |
H A D | slipif.c | 46 * This is an arch independent SLIP netif. The specific serial hooks must be 54 * 3) Call slipif_received_byte[s]() from your serial RX ISR and 109 * Uses the serial layer's sio_send() 113 * @return always returns ERR_OK since the serial layer does not provide return values 130 /* Send pbuf out on the serial I/O device. */ in slipif_output() 164 * Uses the serial layer's sio_send() 169 * @return always returns ERR_OK since the serial layer does not provide return values 183 * Uses the serial layer's sio_send() 188 * @return always returns ERR_OK since the serial layer does not provide return values 352 * @return ERR_OK if serial line could be opened, [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.0.2/src/netif/ |
H A D | slipif.c | 46 * This is an arch independent SLIP netif. The specific serial hooks must be 54 * 3) Call slipif_received_byte[s]() from your serial RX ISR and 109 * Uses the serial layer's sio_send() 113 * @return always returns ERR_OK since the serial layer does not provide return values 130 /* Send pbuf out on the serial I/O device. */ in slipif_output() 164 * Uses the serial layer's sio_send() 169 * @return always returns ERR_OK since the serial layer does not provide return values 183 * Uses the serial layer's sio_send() 188 * @return always returns ERR_OK since the serial layer does not provide return values 351 * @return ERR_OK if serial line could be opened, [all …]
|
/nrf52832-nimble/rt-thread/libcpu/blackfin/bf53x/ |
H A D | serial.c | 2 * File : serial.c 19 #include "serial.h" 28 * This function initializes serial 57 /* save a char to serial buffer */ 192 * to be polite with serial console add a line feed in rt_serial_write() 235 * serial register 237 …rial_register(rt_device_t device, const char* name, rt_uint32_t flag, struct serial_device *serial) in rt_hw_serial_register() argument 250 device->user_data = serial; in rt_hw_serial_register() 256 /* ISR for serial interrupt */
|
/nrf52832-nimble/rt-thread/libcpu/unicore32/sep6200/ |
H A D | serial.c | 2 * File : serial.c 26 #include "serial.h" 35 * This function initializes serial 64 /* save a char to serial buffer */ 197 * to be polite with serial console add a line feed in rt_serial_write() 240 * serial register 242 …rial_register(rt_device_t device, const char* name, rt_uint32_t flag, struct serial_device *serial) in rt_hw_serial_register() argument 255 device->user_data = serial; in rt_hw_serial_register() 261 /* ISR for serial interrupt */
|
/nrf52832-nimble/rt-thread/libcpu/arm/s3c24x0/ |
H A D | serial.c | 14 #include "serial.h" 23 * This function initializes serial 52 /* save a char to serial buffer */ 199 * to be polite with serial console add a line feed in rt_serial_write() 242 * serial register 244 …rial_register(rt_device_t device, const char* name, rt_uint32_t flag, struct serial_device *serial) in rt_hw_serial_register() argument 257 device->user_data = serial; in rt_hw_serial_register() 263 /* ISR for serial interrupt */
|
/nrf52832-nimble/rt-thread/libcpu/arm/sep4020/ |
H A D | serial.c | 14 #include "serial.h" 23 * This function initializes serial 52 /* save a char to serial buffer */ 185 * to be polite with serial console add a line feed in rt_serial_write() 228 * serial register 230 …rial_register(rt_device_t device, const char* name, rt_uint32_t flag, struct serial_device *serial) in rt_hw_serial_register() argument 243 device->user_data = serial; in rt_hw_serial_register() 249 /* ISR for serial interrupt */
|
/nrf52832-nimble/rt-thread/components/net/lwip-1.4.1/src/netif/ |
H A D | slipif.c | 45 * 3) Call slipif_received_byte[s]() from your serial RX ISR and 54 * This is an arch independent SLIP netif. The specific serial hooks must be 107 * Uses the serial layer's sio_send() 112 * @return always returns ERR_OK since the serial layer does not provide return values 131 /* Send pbuf out on the serial I/O device. */ in slipif_output() 308 * @return ERR_OK if serial line could be opened, 310 * ERR_IF is serial line couldn't be opened 312 * @note netif->num must contain the number of the serial port to open 314 * u8_t pointer pointing to the serial port number instead of netif->num. 343 /* Try to open the serial port. */ in slipif_init() [all …]
|