HomeAut
Main Page
Data Structures
Files
File List
Globals
commonIO.h
1
/*
2
* commonIO.h
3
*
4
* Created on: 2016. nov. 28.
5
* Author: Vizi Gábor
6
* E-mail: vizi.gabor90@gmail.com
7
* Function: -
8
* Target: STM32Fx
9
* Version: -
10
* Last modified: 2016. nov. 28.
11
*/
12
13
#ifndef COMMONIO_H_
14
#define COMMONIO_H_
15
16
17
18
/*------------------------------------------------------------------------------
19
* Type definitions
20
*----------------------------------------------------------------------------*/
21
22
typedef
enum
23
{
24
IO_UNKNOWN,
25
IO_INPUT,
26
IO_OUTPUT,
27
28
// Do not use:
29
IO_COUNT
30
} IO_Type;
31
32
33
34
typedef
enum
35
{
36
OUTPUT_DONTCARE,
37
OUTPUT_HIGH,
38
OUTPUT_LOW,
39
OUTPUT_TOGGLE,
40
OUTPUT_STATUS,
41
42
// Do not use:
43
OUTPUT_COUNT
44
} Output_Type;
45
46
47
48
/*------------------------------------------------------------------------------
49
* Global function declarations
50
*----------------------------------------------------------------------------*/
51
52
bool
IO_Init(
char
port, uint8_t pin, IO_Type io);
53
bool
IO_SetOutput(
char
port, uint8_t pin, Output_Type output);
54
bool
IO_ReadPin(
char
port, uint8_t pin);
55
56
57
58
59
#endif
/* COMMONIO_H_ */
Inc
commonIO.h
Generated by
1.8.11