Open Sint  3.4-2
cell.h
Go to the documentation of this file.
1 /* This file is part of OpenSint
2  * Copyright (C) 2005-2012 Enrico Rossi
3  *
4  * OpenSint is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * OpenSint is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
25 #ifndef _CELL_H_
26 #define _CELL_H_
27 
28 #include "uart.h"
29 
32 #define PHONE_PORT PORTB
33 
36 #define PHONE_ON PB0
37 
40 #define MODEM_USART_PORT 0
41 
47 /*
48 #define CELL_FIXED_OPERATOR "at+cops=1,2,<op-code>\r"
49 */
50 
51 #ifndef TRUE
52 #define TRUE 1
53 #define FALSE 0
54 #endif
55 
56 void phone_send(const char *s);
57 void phone_init(void);
58 uint8_t phone_on(void);
59 uint8_t phone_msg(char *s);
60 void phone_answer(void);
61 void phone_hangup(void);
62 uint8_t phone_waitfor(const char *s, const uint8_t locked);
63 
64 #endif
Serial I/O.
void phone_answer(void)
answer the call
Definition: cell.c:158
void phone_hangup(void)
drop the call
Definition: cell.c:165
uint8_t phone_on(void)
power up the phone.
Definition: cell.c:114
void phone_send(const char *s)
the cellular phone.
Definition: cell.c:34
void phone_init(void)
initialize the serial port connected to the phone.
Definition: cell.c:102
uint8_t phone_msg(char *s)
check for a message from the phone.
Definition: cell.c:43
uint8_t phone_waitfor(const char *s, const uint8_t locked)
Wait for string from the modem.
Definition: cell.c:69