⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 msring.h

📁 在ARM7和UC/OSII的平台上实现了GPS自动报站的功能,涉及GPS模块LEA_4S的驱动,位置速寻算法,语音芯片ISD4004的录放音驱动,LED页面管理等等.从启动代码到操作系统的移植以及到业
💻 H
字号:
/* FILENAME: msring.h
 *
 * Definitions for ring buffer support for NicheLite M_SOCKs.
 * See misclib/msring.c for implementation.
 *
 * PORTABLE: YES
 * 
 * MODULE: H
 */

#ifndef MSRING_H_
#define MSRING_H_

#ifdef MINI_TCP

/* struct msring - a ring buffer structure for NicheLite sockets
 */
struct msring
{
   M_SOCK * buf;           /* ptr to storage for buffered M_SOCKs */
   unsigned buflen;        /* length (in M_SOCKs) of buf */
   unsigned in;            /* index into buf: where to add next M_SOCK */
   unsigned out;           /* index into buf: where to delete next M_SOCK */
};

/* function prototypes */
void msring_init(struct msring * ring,
                 M_SOCK * buf,
                 unsigned bufsize);
void msring_add(struct msring * ring,
                M_SOCK so);
int msring_del(struct msring * ring,
               M_SOCK * so);

#endif /* MINI_TCP */

#endif  /* MSRING_H_ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -