C-Netz: Update anouncement to better quality version
This commit is contained in:
10899
src/cnetz/ansage.c
10899
src/cnetz/ansage.c
File diff suppressed because it is too large
Load Diff
@@ -22,7 +22,6 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <osmocom/core/utils.h>
|
#include <osmocom/core/utils.h>
|
||||||
#include <osmocom/core/application.h>
|
#include <osmocom/core/application.h>
|
||||||
#include <osmocom/cc/misc.h>
|
|
||||||
#include "logging.h"
|
#include "logging.h"
|
||||||
|
|
||||||
int loglevel = LOGL_INFO;
|
int loglevel = LOGL_INFO;
|
||||||
@@ -249,7 +248,9 @@ void logging_init(void)
|
|||||||
.num_cat = log_categories_size,
|
.num_cat = log_categories_size,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef DLCC
|
||||||
osmo_cc_set_log_cat(DLCC);
|
osmo_cc_set_log_cat(DLCC);
|
||||||
|
#endif
|
||||||
|
|
||||||
osmo_init_logging2(NULL, &log_info);
|
osmo_init_logging2(NULL, &log_info);
|
||||||
log_set_print_timestamp(osmo_stderr_target, 0);
|
log_set_print_timestamp(osmo_stderr_target, 0);
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
#include "serial.h"
|
#include "serial.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
serial = serial_open("/dev/ttyS0",9600,8,n,1,'d','e',1,2);
|
serial = serial_open("/dev/ttyS0",9600,8,'n',1,'d','e',0,1,2);
|
||||||
|
|
||||||
the return value will be a "serial handle" (!NOT THE FILE HANDLE) for all routines. on failure, a NULL will be returned.
|
the return value will be a "serial handle" (!NOT THE FILE HANDLE) for all routines. on failure, a NULL will be returned.
|
||||||
|
|
||||||
@@ -42,6 +42,7 @@ char parity; n=no,e=even,o=odd
|
|||||||
int stopbits; 1-2
|
int stopbits; 1-2
|
||||||
char xonxoff; e=disable,e=enable
|
char xonxoff; e=disable,e=enable
|
||||||
char rtscts; e=disable,e=enable
|
char rtscts; e=disable,e=enable
|
||||||
|
int serial_getbreak get or ignore break
|
||||||
float txtimeout; seconds timeout for transmit
|
float txtimeout; seconds timeout for transmit
|
||||||
float rxtimeout; seconds timeout for receive
|
float rxtimeout; seconds timeout for receive
|
||||||
|
|
||||||
@@ -121,7 +122,6 @@ serial_t *serial_open(const char *serial_device, int serial_baud, int serial_dat
|
|||||||
serial->txtimeout = serial_txtimeout;
|
serial->txtimeout = serial_txtimeout;
|
||||||
serial->rxtimeout = serial_rxtimeout;
|
serial->rxtimeout = serial_rxtimeout;
|
||||||
|
|
||||||
|
|
||||||
if ((serial->handle = open(serial->device, O_RDWR | O_NONBLOCK)) >= 0) {
|
if ((serial->handle = open(serial->device, O_RDWR | O_NONBLOCK)) >= 0) {
|
||||||
if (isatty(serial->handle)) {
|
if (isatty(serial->handle)) {
|
||||||
/* get termios */
|
/* get termios */
|
||||||
@@ -235,7 +235,7 @@ reads until buffer "size" has reached or until timeout has occurred.
|
|||||||
"read" gives the number of bytes read.
|
"read" gives the number of bytes read.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int serial_read(serial_t *serial, uint8_t *buffer, int size)
|
int serial_read(serial_t *serial, uint8_t *buffer, size_t size)
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
@@ -259,7 +259,7 @@ writes until buffer "size" has reached or until timeout has occurred.
|
|||||||
"wrote" gives the number of bytes written.
|
"wrote" gives the number of bytes written.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int serial_write(serial_t *serial, uint8_t *buffer, int size)
|
int serial_write(serial_t *serial, const uint8_t *buffer, size_t size)
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
fd_set Desc;
|
fd_set Desc;
|
||||||
|
@@ -24,8 +24,8 @@ typedef struct _serial {
|
|||||||
|
|
||||||
serial_t *serial_open(const char *serial_device, int serial_baud, int serial_databits, char serial_parity, int serial_stopbits, char serial_xonxoff, char serial_rtscts, int serial_getbreak, float serial_txtimeout, float serial_rxtimeout);
|
serial_t *serial_open(const char *serial_device, int serial_baud, int serial_databits, char serial_parity, int serial_stopbits, char serial_xonxoff, char serial_rtscts, int serial_getbreak, float serial_txtimeout, float serial_rxtimeout);
|
||||||
void serial_close(serial_t *serial);
|
void serial_close(serial_t *serial);
|
||||||
int serial_read(serial_t *serial, uint8_t *buffer, int size);
|
int serial_read(serial_t *serial, uint8_t *buffer, size_t size);
|
||||||
int serial_write(serial_t *serial, uint8_t *buffer, int size);
|
int serial_write(serial_t *serial, const uint8_t *buffer, size_t size);
|
||||||
int serial_timeout(serial_t *serial, double serial_txtimeout, double serial_rxtimeout);
|
int serial_timeout(serial_t *serial, double serial_txtimeout, double serial_rxtimeout);
|
||||||
int serial_cts(serial_t *serial);
|
int serial_cts(serial_t *serial);
|
||||||
int serial_dsr(serial_t *serial);
|
int serial_dsr(serial_t *serial);
|
||||||
|
Reference in New Issue
Block a user