]> rtime.felk.cvut.cz Git - mirosot.git/blob - bluetooth/inface_bth.h
Initial import of Petr's work.
[mirosot.git] / bluetooth / inface_bth.h
1 /*******************************************************************
2   bluetooth library
3
4   inface_bth.h -  list of fce inface_bth.c and definition structurs for keeping information
5                   about data queue
6
7   Copyright (C) 2006 by Petr Kovacik petr_kovacik@gmail.com
8
9  *******************************************************************/
10
11 #ifndef _ID_RS232_H_
12 #define _ID_RS232_H_
13
14 #include <periph/sci_regs.h>
15 //*************************************************************
16 #define BTH_INFACE_BUF_LEN    (70)
17 #define BTH_INFACE_BUF_FULLTG (50)
18
19
20 typedef struct{
21     __u8 *buf_beg; //start of adress structur
22     __u8 *buf_end; //end of adress structur - beg+sizeof(struct)
23     __u8 *ip;      //actual position at queue
24     __u8 *op;      //position first unread char of queue
25 } bth_inface_que_t;
26
27
28   /* Queues */
29 typedef struct bth_inface_info {
30   bth_inface_que_t bth_inface_que_in;
31   bth_inface_que_t bth_inface_que_out;
32
33   __u8 bth_inface_buf_in[BTH_INFACE_BUF_LEN];
34   __u8 bth_inface_buf_out[BTH_INFACE_BUF_LEN];
35 } bth_inface_info_t;
36
37 int bth_inface_sendch(int c);
38 int bth_inface_bth_recch(void);
39 int bth_inface_sendstr(const char *s);
40
41 int bth_inface_que_out_free(int chan);
42 int bth_inface_que_in_ready(int chan);
43 int bth_inface_setmode(long int baud, int mode, int flowc, int chan);
44
45
46 #endif /* _ID_RS232_H_ */
47
48 /* Local variables: */
49 /* c-basic-offset:2 */
50 /* End: */