Specifications
/* Signal to debounce that a button has been pressed */
button = 1;
/* change mode to stop */
play = 0;
/* This will discard all transfer until it recieves GAP */
discard = 1;
/* Return the handler - signals the interrupt is finished */
NutEventPostAsync(&q_stop);
}
/*
* Next button ISR
*/
static void NextButton(void *arg)
{
/*Diable the button interrupt*/
EIMSK = EIMSK & ~(0x08);
/* Disable the encoder access to the buffer */
tx_act = 0;
/* Send command to the server */
NutTcpSend(command_sock, "NEXT\n", 12);
/* This will discard all transfer until it recieves GAP */
discard = 1;
/* Signal to debounce that a button has been pressed */
button = 1;
/* Return the handler - signals the interrupt is finished */
NutEventPostAsync(&q_next);
}
/*
* Previous button ISR
*/
static void PreviousButton(void *arg)
{
/*Diable the button interrupt*/
EIMSK = EIMSK & ~(0x02);
/* Disable the encoder access to the buffer */
tx_act = 0;
/* Send command to the server */
NutTcpSend(command_sock, "PREV\n", 12);
/* This will discard all transfer until it recieves GAP */
discard = 1;
/* Signal to debounce that a button has been pressed */
button = 1;
/* Return the handler - signals the interrupt is finished */
NutEventPostAsync(&q_previous);
}
74










