poppy_com
0.1
Poppy2.0 communication library
Main Page
Related Pages
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Enumerations
Enumerator
Pages
poppy-com
hal
atmega328p
hal.h
1
#ifndef HAL_H_
2
#define HAL_H_
3
4
#include "poppy-com/inc/context.h"
5
6
typedef
enum
{
7
// Send start condition
8
START,
9
// Send data with ACK enable
10
DATA,
11
// Send data with ACK disable
12
DATA_NACK,
13
// Send stop condition
14
STOP
15
}com_state_t;
16
17
void
hal_init(
void
);
18
void
id_update(
unsigned
char
id
);
19
20
unsigned
char
i2cAddr(
unsigned
char
addr,
msg_dir_t
dir);
21
unsigned
char
i2cWrite(
unsigned
char
data);
22
unsigned
char
i2cRead(
unsigned
char
ack_enable,
unsigned
char
*data);
23
unsigned
char
i2c_transmit(com_state_t type);
24
unsigned
char
crc(
unsigned
char
* data,
unsigned
char
size);
25
26
#endif
/* HAL_H_ */
msg_dir_t
msg_dir_t
Message direction enum.
Definition:
poppyNetwork.h:22
Generated on Fri Aug 5 2016 15:36:17 for poppy_com by
1.8.6