Sygaldry
Loading...
Searching...
No Matches
sygbr-cli.hpp
1#pragma once
2/*
3Copyright 2023 Travis J. West, Input Devices and Music Interaction Laboratory
4(IDMIL), Centre for Interdisciplinary Research in Music Media and Technology
5(CIRMMT), McGill University, Montréal, Canada, and Univ. Lille, Inria, CNRS,
6Centrale Lille, UMR 9189 CRIStAL, F-59000 Lille, France
7
8SPDX-License-Identifier: MIT
9*/
10
11#include <stdio.h>
12#include "sygbp-cli.hpp"
13#include "sygup-cstdio_logger.hpp"
14
15namespace sygaldry { namespace sygbr {
16
19
23
25
30{
31 int last_read;
32 bool ready()
33 {
34 last_read = getchar_timeout_us(0);
35 return last_read != PICO_ERROR_TIMEOUT;
36 }
37
38 char getchar()
39 {
40 return last_read;
41 }
42};
43
46template<typename Components>
47using PicoCli = sygbp::Cli<PicoReader, sygup::CstdioLogger, Components>;
48
51
52} }
sygbp::Cli< PicoReader, sygup::CstdioLogger, Components > PicoCli
Definition sygbr-cli.hpp:47
Command line input reader for Pico SDK.
Definition sygbr-cli.hpp:30