34 #ifndef _AVRIO_AX25_H_ 35 #define _AVRIO_AX25_H_ 37 #include <avrio/defs.h> 42 #include "avrio-board-ax25.h" 43 #include <avrio/hdlc.h> 64 #define AX25_MIN_FRAME_LEN 18 70 #define AX25_CTRL_UI 0x03 76 #define AX25_PID_NOLAYER3 0xF0 81 #define AX25_MAX_RPT 8 89 #define AX25_CALL(str, id) {.call = (str), .ssid = (id) } 106 #define AX25_PATH(dst, src, ...) { dst, src, ## __VA_ARGS__ } 118 #define vAx25Send(ax25, dst, src, buf, len) vAx25SendVia(ax25, ({static xAx25Node __path[]={dst, src}; __path;}), 2, buf, len) 146 #if CONFIG_AX25_RPT_LST 150 #define AX25_REPEATED(msg, idx) ((msg)->rpt_flags & _BV(idx)) 222 #if defined(__DOXYGEN__) 243 #define CONFIG_AX25_FRAME_BUF_LEN 251 #define CONFIG_AX25_RPT_LST uint16_t crc_out
CRC calculé en sortie.
const uint8_t * info
Pointeur sur les informations (payload)
xAx25Node dst
Destination de la trame.
vAx25CallBack hook
Fonction de traitement des trames reçues.
bool sync
Vrai si un flag HDLC de début de trame a été reçu.
void vAx25Init(struct xAx25 *ax25, FILE *fin, FILE *fout, vAx25CallBack hook)
uint16_t ctrl
Champs contrôle AX25.
void(* vAx25CallBack)(struct xAx25Frame *msg)
void vAx25Print(FILE *f, const xAx25Frame *msg)
char call[6]
Indicatif composé d'au plus 6 caractères ASCII (lettres et chiffres)
struct xAx25Frame xAx25Frame
bool escape
Vrai si un cacractère d'échappement a été reçu.
struct xAx25Node xAx25Node
uint8_t pid
Champs d'identification du protocole AX25.
xAx25Node src
Source de la trame.
FILE * fout
Fichier pour accèder à la couche physique en sortie.
#define CONFIG_AX25_FRAME_BUF_LEN
Taille buffer de réception.
uint8_t ssid
Identifiant de sous-station (0 à 15)
void vAx25Poll(struct xAx25 *ax25)
size_t frm_len
Nombre d'octets reçus.
void vAx25SendVia(struct xAx25 *ax25, const xAx25Node *path, size_t path_len, const void *_buf, size_t len)
size_t len
Nombre d'octets du payload.
uint16_t crc_in
CRC calculé en entrée.
FILE * fin
Fichier pour accèder à la couche physique en entrée.