Guo Wenxue
2019-06-27 b64d6ff04401ed85fce543b8e20c8c360fb284f5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/********************************************************************************
 *      Copyright:  (C) 2019 LingYun IoT System Studio
 *                  All rights reserved.
 *
 *       Filename:  relay.h
 *    Description:  This head file 
 *
 *        Version:  1.0.0(30/01/19)
 *         Author:  Guo Wenxue <guowenxue@gmail.com>
 *      ChangeLog:  1, Release initial version on "30/01/19 08:49:31"
 *                 
 ********************************************************************************/
 
#ifndef  _RELAY_H_
#define  _RELAY_H_
 
#ifndef ON
#define ON                  1
#define OFF                 0
#endif
 
 
/* I/O Pin connected to PIN#40, BCM code pin number is 21 and wPi pin number is 29, 
 * can check by linux command <gpio readall> on RPi */
#define RELAY_PIN           29
 
void init_relay(void);
void turn_relay(int cmd);
 
#endif   /* ----- #ifndef _RELAY_H_  ----- */