Tiny protocol
0.9.3
Tiny communication protocol for microcontrollers
src
proto
hal
include
linux_hal.h
1
/*
2
Copyright 2016 (C) Alexey Dynda
3
4
This file is part of Tiny Protocol Library.
5
6
Protocol Library is free software: you can redistribute it and/or modify
7
it under the terms of the GNU Lesser General Public License as published by
8
the Free Software Foundation, either version 3 of the License, or
9
(at your option) any later version.
10
11
Protocol Library is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU Lesser General Public License for more details.
15
16
You should have received a copy of the GNU Lesser General Public License
17
along with Protocol Library. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
20
#pragma once
21
22
#include <pthread.h>
23
#include <unistd.h>
24
#include <stdint.h>
25
#include <time.h>
26
27
#ifndef CONFIG_ENABLE_CHECKSUM
28
# define CONFIG_ENABLE_CHECKSUM
29
#endif
30
31
#ifndef CONFIG_ENABLE_FCS16
32
# define CONFIG_ENABLE_FCS16
33
#endif
34
35
#ifndef CONFIG_ENABLE_FCS32
36
# define CONFIG_ENABLE_FCS32
37
#endif
38
39
#ifndef DOXYGEN_SHOULD_SKIP_THIS
40
45
typedef
pthread_mutex_t tiny_mutex_t;
46
51
typedef
struct
52
{
53
uint8_t bits;
54
uint16_t waiters;
55
pthread_mutex_t mutex;
56
pthread_cond_t cond;
57
} tiny_events_t;
58
59
#endif
Generated by
1.8.13