int main (int argc, char *argv[]) { dw_printf ("CQ DX\n"); morse_send (0, "CQ DX", 10, 10, 10); dw_printf ("\n\n"); dw_printf ("wb2osz/9\n"); morse_send (0, "wb2osz/9", 10, 10, 10); dw_printf ("\n\n"); }
static void xmit_morse (int c, packet_t pp, int wpm) { int info_len; unsigned char *pinfo; info_len = ax25_get_info (pp, &pinfo); text_color_set(DW_COLOR_XMIT); dw_printf ("[%d.morse] \"%s\"\n", c, pinfo); ptt_set (OCTYPE_PTT, c, 1); morse_send (c, (char*)pinfo, wpm, xmit_txdelay[c] * 10, xmit_txtail[c] * 10); ptt_set (OCTYPE_PTT, c, 0); ax25_delete (pp); } /* end xmit_morse */
void call_transmit_if_needed (void) { NVIC_DisableIRQ (TIMER_32_0_IRQn); if (transmit_call) { DBG (DBG_LEVEL_INFO, "Transmitting station ID (%s)", CALL_STRING); tx_enable (); while (!tx_is_ready ()); morse_send (CALL_STRING, strlen (CALL_STRING)); systick_delay (CALL_POST_DELAY_MS); tx_disable (); transmit_call = false; Chip_TIMER_Reset (LPC_TIMER32_0); Chip_TIMER_ClearMatch(LPC_TIMER32_0, 0); Chip_TIMER_SetMatch (LPC_TIMER32_0, 0, CALL_INTERVAL_SEC); NVIC_ClearPendingIRQ (TIMER_32_0_IRQn); } NVIC_EnableIRQ (TIMER_32_0_IRQn); }
static void send_packet (char *str) { packet_t pp; unsigned char fbuf[AX25_MAX_PACKET_LEN+2]; int flen; int c; if (g_morse_wpm > 0) { morse_send (0, str, g_morse_wpm, 100, 100); } else { pp = ax25_from_text (str, 1); flen = ax25_pack (pp, fbuf); for (c=0; c<modem.adev[0].num_channels; c++) { hdlc_send_flags (c, 8, 0); hdlc_send_frame (c, fbuf, flen); hdlc_send_flags (c, 2, 1); } ax25_delete (pp); } }