aroarfw
types.h
Go to the documentation of this file.
1 //types.h:
2 
3 /*
4  * Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2010-2013
5  *
6  * This file is part of aroarfw, a RoarAudio framework for
7  * embedded systems (µControlers).
8  *
9  * This file is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License version 3
11  * or (at your option) any later version as published by
12  * the Free Software Foundation.
13  *
14  * aroarfw is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this software; see the file COPYING. If not, write to
21  * the Free Software Foundation, 51 Franklin Street, Fifth Floor,
22  * Boston, MA 02110-1301, USA.
23  */
24 
25 #ifndef _AROARFW_TYPES_H_
26 #define _AROARFW_TYPES_H_
27 
28 #include <stdint.h>
29 
30 #ifdef __GNUC__
31 #define __RPACKED__ __attribute__((packed))
32 #else
33 #define __RPACKED__
34 #warn "Don't know how to pack a struct with your compiler correctly"
35 #endif
36 
39 typedef uint16_t rcid_t;
40 
42 typedef uint16_t rsid_t;
43 
45 typedef uint32_t rpos_t;
46 
48 typedef uint32_t rpid_t;
49 
51 typedef uint8_t ruuid_t[16];
52 
54 typedef enum {
55  // Invalid value
58  RIODIR_NONE = 0x00,
60  RIODIR_IN = 0x01,
62  RIODIR_OUT = 0x02,
66 
67 #endif
68 
69 //ll
RIODIR_NONE
@ RIODIR_NONE
This stream has no defined IO direction.
Definition: types.h:58
RIODIR_IN
@ RIODIR_IN
This stream is a input stream.
Definition: types.h:60
RIODIR_OUT
@ RIODIR_OUT
This stream is an output stream.
Definition: types.h:62
RIODIR_INOUT
@ RIODIR_INOUT
This stream is bidirectional.
Definition: types.h:64
rsid_t
uint16_t rsid_t
Type for Stream IDs.
Definition: types.h:42
RIODIR_INVALID
@ RIODIR_INVALID
Definition: types.h:56
riodir_t
riodir_t
Type of IO direction.
Definition: types.h:54
rcid_t
uint16_t rcid_t
Definition: types.h:39
rpid_t
uint32_t rpid_t
Type for process IDs.
Definition: types.h:48
rpos_t
uint32_t rpos_t
Type for stream positions.
Definition: types.h:45
ruuid_t
uint8_t ruuid_t[16]
Type to store packed UUID.
Definition: types.h:51