summaryrefslogtreecommitdiff
path: root/src/c/hardware/avr/includes/AVRPeripheralUART.h
blob: 09db3b032b7efba27f0196c013c5d5a5b2f417bd (plain)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
// Copyright (C) 2017 - IIT Bombay - FOSSEE
//
// This file must be used under the terms of the CeCILL.
// This source file is licensed as described in the file COPYING, which
// you should have received as part of this distribution.  The terms
// are also available at
// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
// Organization: FOSSEE, IIT Bombay
// Author: Ashish Kamble
// Email: toolbox@scilab.in


#ifndef __AVRPERIPHERALUART_H__
#define __AVRPERIPHERALUART_H__

#include <avr/io.h>
#include "types.h"


#ifdef  __cplusplus
extern "C" {
#endif

//Function prototypes
uint8 u8AVRUARTSetups(uint8 mode, uint32 baudrate, uint8 stopbits, uint8 parity);

uint8 u8AVRUARTTransmits(uint8 data);

uint8 gAVRUARTTransmits(char* msg,int size);

uint8 u16AVRUARTTransmits(uint16 data);

uint8 i16AVRUARTTransmits(int16 data);

uint8 i8AVRUARTTransmits(int8 data);

//uint8 sAVRUARTTransmits(float data);

uint8 u8AVRUARTTransmita(uint8 *x,int size);

//uint8 gAVRUARTTransmita(uint8 *x,int size);

uint8 u16AVRUARTTransmita(uint16 *x,int size);

uint8 i16AVRUARTTransmita(int16 *x,int size);

uint8 i8AVRUARTTransmita(int8 *x,int size);

uint8 u8AVRUSARTReceiveCharu8();

uint8 dAVRUARTTransmits(double data);

#ifdef  __cplusplus
} /* extern "C" */
#endif

#endif /* !__AVRUART_H__ */