Ejemplo n.º 1
0
Archivo: main.c Proyecto: DINKIN/bertos
	 * is the hardware abstraction layer.
	 * We do not need transmission for now, so we set transmission DAC channel to 0.
	 */
	afsk_init(&afsk, ADC_CH, 0);
	/*
	 * Here we initialize AX25 context, the channel (KFile) we are going to read messages
	 * from and the callback that will be called on incoming messages.
	 */
	ax25_init(&ax25, &afsk.fd, message_callback);

	/* Initialize serial port, we are going to use it to show APRS messages*/
	ser_init(&ser, SER_UART0);
	ser_setbaudrate(&ser, 115200L);
}

static AX25Call path[] = AX25_PATH(AX25_CALL("apzbrt", 0), AX25_CALL("nocall", 0), AX25_CALL("wide1", 1), AX25_CALL("wide2", 2));

#define APRS_MSG    ">Test BeRTOS APRS http://www.bertos.org"

int main(void)
{
	init();
	ticks_t start = timer_clock();

	while (1)
	{
		/*
		 * This function will look for new messages from the AFSK channel.
		 * It will call the message_callback() function when a new message is received.
		 * If there's nothing to do, this function will call cpu_relax()
		 */
Ejemplo n.º 2
0
/* constants ================================================================ */
// Les constantes ci_dessous peuvent être modifiées au besoin par l'utilisateur
// Baudrate de la liaison série en baud
#define SER_BAUDRATE  38400
// Période d'envoi des trames en ms
#define TX_PERIOD_MS  2000
// Station destination de la trame envoyée
#define APRS_DST "tlm100"
// Station source de la trame envoyée
#define APRS_SRC "nocall"
// Information APRS envoyé
#define APRS_MSG ">Test %05u SolarPi APRS http://www.btssn.net"

/* private variables ======================================================== */
static xAx25 ax25;
static xAx25Node path[] = AX25_PATH(AX25_CALL(APRS_DST, 0), AX25_CALL(APRS_SRC, 0));

/* internal public functions ================================================ */
int
main(void) {

  vLedInit();
  vSerialInit (SER_BAUDRATE/100, SERIAL_DEFAULT + SERIAL_WR);
  vAfskInit (AFSK_MODE_NOBLOCK);
  vAx25Init (&ax25, &xAfskPort, &xAfskPort, NULL);
  sei();

  for (;;) {
    static uint16_t usCount;
    char msg[80];
    // Numérotation de la trame afin de suivre la perte éventuelle à la
Ejemplo n.º 3
0
	 */
	afsk_init(&afsk, ADC_CH, 0);
	/*
	 * Here we initialize AX25 context, the channel (KFile) we are going to read messages
	 * from and the callback that will be called on incoming messages.
	 */
	ax25_init(&ax25, &afsk.fd, message_callback);

#if 1
	/* Initialize serial port, we are going to use it to show APRS messages*/
	ser_init(&ser, SER_UART0);
	ser_setbaudrate(&ser, 115200L);
#endif
}

static AX25Call path[] = AX25_PATH(AX25_CALL(CALL_BERTOS_APRS, 0), AX25_CALL("", 0), AX25_CALL("wide1", 1), AX25_CALL("wide2", 2));

int main(void)
{
	init();
	ticks_t start = timer_clock();
	unsigned char x = 0;

	// FIXME
	memcpy(path[1].call, MYCALL, 6);
	path[1].ssid = MYCALL_SSID;

	while (1)
	{
		/* As long as CONFIG_AFSK_RXTIMEOUT is set to 0, this function won't block and return immediately. */
		ax25_poll(&ax25);