-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathi2c_clos.c
46 lines (32 loc) · 1.15 KB
/
i2c_clos.c
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include <p18cxxx.h>
#include "i2c.h"
#if defined (I2C_V1)
/*********************************************************************
Function Prototype : void CloseI2C(void)
Include : i2c.h
Description : This function turns off the I2C module
Arguments : None
Return Value : None
Remarks : This function disables the I2C module and clears the
I2C Interrupt Enable and Flag bits.
*********************************************************************/
void CloseI2C( void )
{
SSPCON1 &= 0xDF; // disable synchronous serial port
}
#endif
#if defined (I2C_V4)
/*********************************************************************
Function Prototype : void CloseI2C(void)
Include : i2c.h
Description : This function turns off the I2C module
Arguments : None
Return Value : None
Remarks : This function disables the I2C module and clears the
I2C Interrupt Enable and Flag bits.
*********************************************************************/
void CloseI2C( void )
{
SSPCON &= 0xDF; // disable synchronous serial port
}
#endif