Subversion Repositories Code-Repo

Rev

Rev 157 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 157 Rev 158
Line 1... Line 1...
1
#include <xc.h>
1
#include <xc.h>
2
#include <stdio.h>
2
#include <stdio.h>
3
#include <string.h>
3
#include <string.h>
4
#include "defines.h"
4
#include "defines.h"
5
#include "i2c.h"
5
#include "base_I2C.h"
6
#include "uart.h"
6
#include "base_UART.h"
7
 
7
 
8
static I2C_DATA *i2c_data_p;
8
static I2C_DATA *i2c_data_p;
9
 
9
 
10
// Set up the data structures for the i2c code
10
// Set up the data structures for the base_I2C.code
11
// Should be called once before any i2c routines are called
11
// Should be called once before any i2c routines are called
12
void I2C_Init(I2C_DATA *data) {
12
void I2C_Init(I2C_DATA *data) {
13
    i2c_data_p = data;
13
    i2c_data_p = data;
14
    
14
    
15
    i2c_data_p->buffer_in_len = 0;
15
    i2c_data_p->buffer_in_len = 0;