pcb and initial code from https://github.com/das-labor/borgware-2d.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
568 B
38 lines
568 B
/*
|
|
* uart_commands.h
|
|
*
|
|
* Created on: 16.08.2014
|
|
* Author: chris
|
|
*/
|
|
|
|
#ifndef UART_COMMANDS_H_
|
|
#define UART_COMMANDS_H_
|
|
|
|
#include <stdbool.h>
|
|
#include <avr/interrupt.h>
|
|
|
|
extern bool g_uartcmd_permit_processing;
|
|
|
|
/**
|
|
* Enables UART command processing.
|
|
*/
|
|
inline static void uartcmd_permit(void) {
|
|
cli();
|
|
g_uartcmd_permit_processing = true;
|
|
sei();
|
|
}
|
|
|
|
|
|
/**
|
|
* Disables UART command processing.
|
|
*/
|
|
inline static void uartcmd_forbid(void) {
|
|
cli();
|
|
g_uartcmd_permit_processing = false;
|
|
sei();
|
|
}
|
|
|
|
|
|
void uartcmd_process(void);
|
|
|
|
#endif /* UART_COMMANDS_H_ */
|
|
|