summaryrefslogtreecommitdiff
path: root/examples/getbaud.h
blob: db7b09263b5fa0a744624649a18be145a41568d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#pragma once

#include <termios.h>

//! Exception
struct bad_speed {};

//! Convert requested int based speed to corresponding speed_t enum value.
//! The retuened enum value will be the closed value not bigger than the
//! requested value.
//! If no matching enum value could be found a bad_speed exception is thrown.
speed_t getBaud(int speed);