RZ/A1H CMSIS-RTOS RTX BSP for GR-PEACH.

Dependents:   GR-PEACH_Azure_Speech ImageZoomInout_Sample ImageRotaion_Sample ImageScroll_Sample ... more

Fork of R_BSP by Daiki Kato

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ioif_aio.h Source File

ioif_aio.h

00001 /******************************************************************************
00002  *
00003  *  V. 2.03.00
00004  * $Rev: 891 $
00005  * $Date:: 2014-06-27 10:40:52 +0900#$
00006  *
00007  * Description : ioif_aio header file
00008  *
00009  * Copyright (C) 2009,2012 Renesas Electronics Corporation. All rights reserved.
00010  *****************************************************************************/
00011 
00012 #ifndef IOIF_AIO_H
00013 #define IOIF_AIO_H
00014 
00015 /*************************************************************************
00016  System Includes
00017 *************************************************************************/
00018 
00019 #include <cmsis_os.h>
00020 #include <posix_types.h>
00021 
00022 #ifdef __cplusplus
00023 extern "C" {
00024 #endif
00025 
00026 /*************************************************************************
00027  User Includes
00028 *************************************************************************/
00029 
00030 /*************************************************************************
00031  Defines
00032 *************************************************************************/
00033 
00034 /* sigev_notify values */
00035 
00036 #define SIGEV_NONE      (1) /**< No notification */
00037 #define SIGEV_THREAD    (2) /**< A notification function is called in the driver's context */
00038 #define SIGEV_EVENT     (3) /**< An event flag is set */
00039 #define SIGEV_CALLBACK  (4) /**< An inter-process callback is made */
00040 
00041 /*************************************************************************
00042  Constant Macros
00043 *************************************************************************/
00044 
00045 /*************************************************************************
00046  Function Macros
00047 *************************************************************************/
00048 
00049 /*************************************************************************
00050  Typedefs
00051 *************************************************************************/
00052 
00053 typedef void *      pthread_attr_t;     /**< unsupported */
00054 
00055 union sigval
00056 {
00057     int             sival_int;          /**< Integer interpretation */
00058     void *          sival_ptr;          /**< Pointer interpretation */
00059 };
00060 
00061 struct sigevent
00062 {
00063     int             sigev_notify;       /**< SIGEV_NONE, SIGEV_THREAD, SIGEV_EVENT */
00064     int             sigev_signo;        /**< signal or callback fp */
00065     union sigval    sigev_value;        /**< user defined value to pass */
00066     void            (*sigev_notify_function) (union sigval);
00067                                         /**< notification function */
00068 };
00069 
00070 struct aiocb
00071 {
00072     /* Implementation specific stuff */
00073     struct aiocb *  pNext;              /**< next aio request */
00074     struct aiocb *  pPrev;              /**< previous aio request */
00075     ssize_t         aio_return;         /**< return value of operation */
00076     int             aio_complete;       /**< non-zero when op is completed */
00077 
00078     /* User parameters */
00079     int             aio_fildes;         /**< FD for asynchronous op */
00080     off_t           aio_offset;         /**< Absolute offset to seek to */
00081     volatile void*  aio_buf;            /**< Buffer to read from/write to */
00082     size_t          aio_nbytes;         /**< Number of bytes to read/write */
00083     struct sigevent aio_sigevent;       /**< Signal to deliver */
00084 
00085     /* Private implementation specific function pointer used by IOIF. Application should not set. */
00086     ssize_t (*aio_iofn)(void *,void *,size_t,int);  /* synchronous I/O function */
00087 };
00088 typedef struct aiocb AIOCB;
00089 
00090 #if(1) /* mbed */
00091 #else  /* not mbed */
00092 struct timespec
00093 {
00094     time_t   tv_sec;            /* Seconds.  */
00095     long int tv_nsec;           /* Nanoseconds.  */
00096 };
00097 #endif /* end mbed */
00098 
00099 #ifdef __cplusplus
00100 }
00101 #endif
00102 
00103 #endif