/* "indicators" */

#include <atari.h>
#include "addrs.h"
#include "indic8.h"
#include "timers.h"

static void ind_start_timer(void) {
	OS.cdtmv5 = timers.net_ind_time;
}

void ind_net_rx(void) {
	*ind_net_status = NET_RX_CHR;
}

void ind_net_tx(void) {
	*ind_net_status = NET_TX_CHR;
}

void ind_net_down(void) {
	*ind_net_status = NET_ERR_CHR;
}

void ind_net_idle(void) {
	*ind_net_status = NET_IDLE_CHR;
}

void ind_act(char c) {
	*ind_act_status = c;
	ind_start_timer();
}

void ind_check_timer(void) {
	if(!OS.cdtmv5)
		*ind_act_status = 0;
}
