1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/include/posix_io.h

50 lines
990 B
C
Raw Normal View History

/*
* Copyright (C) 2013 INRIA.
*
2014-08-23 15:43:13 +02:00
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
2013-11-28 13:25:33 +01:00
* @ingroup sys_posix
* @{
2013-11-28 13:25:33 +01:00
* @file posix_io.h
* @brief POSIX-like IO
*
2013-11-28 13:25:33 +01:00
* @author Kaspar Schleiser <kaspar@schleiser.de>
* @author Stephan Zeisberg <zeisberg@mi.fu-berlin.de>
* @author Oliver Hahm <oleg@hobbykeller.org>
* @author Martin Lenders <mlenders@inf.fu-berlin.de>
*/
2010-09-24 16:28:34 +02:00
#ifndef __READ_H
#define __READ_H
2010-09-24 16:28:34 +02:00
#include "kernel_types.h"
2014-10-10 11:51:11 +02:00
#ifdef __cplusplus
extern "C" {
#endif
2010-09-24 16:28:34 +02:00
#define OPEN 0
#define CLOSE 1
#define READ 2
#define WRITE 3
struct posix_iop_t {
2010-09-24 16:28:34 +02:00
int nbytes;
char *buffer;
};
int posix_open(int pid, int flags);
int posix_close(int pid);
int posix_read(int pid, char *buffer, int bufsize);
int posix_write(int pid, char *buffer, int bufsize);
2013-11-28 13:25:33 +01:00
2014-10-10 11:51:11 +02:00
#ifdef __cplusplus
}
#endif
2013-11-28 13:25:33 +01:00
/** @} */
2010-09-24 16:28:34 +02:00
#endif /* __READ_H */