Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
Loading...
Searching...
No Matches
motion_drv.h
Go to the documentation of this file.
1
/*
2
* MikroSDK - MikroE Software Development Kit
3
* Copyright© 2020 MikroElektronika d.o.o.
4
*
5
* Permission is hereby granted, free of charge, to any person
6
* obtaining a copy of this software and associated documentation
7
* files (the "Software"), to deal in the Software without restriction,
8
* including without limitation the rights to use, copy, modify, merge,
9
* publish, distribute, sublicense, and/or sell copies of the Software,
10
* and to permit persons to whom the Software is furnished to do so,
11
* subject to the following conditions:
12
*
13
* The above copyright notice and this permission notice shall be
14
* included in all copies or substantial portions of the Software.
15
*
16
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
20
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
22
* OR OTHER DEALINGS IN THE SOFTWARE.
23
*/
24
33
// ----------------------------------------------------------------------------
34
35
#ifndef MOTION_DRV_H
36
#define MOTION_DRV_H
37
38
#include "drv_digital_in.h"
39
#include "drv_digital_out.h"
40
41
// --------------------------------------------------------------- PUBLIC TYPES
50
typedef
struct
51
{
52
// Output pins
53
54
digital_out_t
en
;
55
56
// Input pins
57
58
digital_in_t
out
;
59
60
}
motion_t
;
61
65
typedef
struct
66
{
67
// Additional gpio pins
68
69
pin_name_t
en
;
70
pin_name_t
out
;
71
72
}
motion_cfg_t
;
73
77
typedef
enum
78
{
79
MOTION_PIN_STATE_LOW
= 0,
80
MOTION_PIN_STATE_HIGH
81
82
}
motion_pin_state_t
;
83
// End types group
85
86
#endif
// MOTION_DRV_H
87
// End public_function group
90
91
// ------------------------------------------------------------------------- END
motion_pin_state_t
motion_pin_state_t
Pin states.
Definition
motion_drv.h:78
MOTION_PIN_STATE_HIGH
@ MOTION_PIN_STATE_HIGH
Definition
motion_drv.h:80
MOTION_PIN_STATE_LOW
@ MOTION_PIN_STATE_LOW
Definition
motion_drv.h:79
motion_cfg_t
Click configuration structure definition.
Definition
motion_drv.h:66
motion_cfg_t::out
pin_name_t out
Definition
motion_drv.h:70
motion_cfg_t::en
pin_name_t en
Definition
motion_drv.h:69
motion_t
Click ctx object definition.
Definition
motion_drv.h:51
motion_t::out
digital_in_t out
Definition
motion_drv.h:58
motion_t::en
digital_out_t en
Definition
motion_drv.h:54
baremetal
mikrosdk-click
include
motion_drv.h
Generated by
1.9.8