summaryrefslogtreecommitdiff
path: root/include/con-utils.h
blob: 86c0df02369c1234b385da33abb1d2694eb5fa01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
 * (C) Copyright 2014 Leo C. <erbl259-lmu@yahoo.de>
 *
 * SPDX-License-Identifier:	GPL-2.0+
 */

/*
 * Console utilities
 */

#ifndef CON_UTILS_H
#define CON_UTILS_H

uint_fast8_t tstc(void);

int my_getchar(uint_fast8_t waitforchar);

/* test if ctrl-c was pressed */
uint_fast8_t ctrlc(void);


/* pass 1 to disable ctrlc() checking, 0 to enable.
 * returns previous state
 */
uint_fast8_t disable_ctrlc(uint_fast8_t disable);

uint_fast8_t had_ctrlc (void);
void clear_ctrlc(void);

#endif /* CON_UTILS_H */