blob: ae286f5bffbcfa68c1d702d9dbe62f52d5b00ca7 [file] [log] [blame]
Urja Rannikko615ba182017-06-15 15:28:27 +03001/*
2 * This file is part of the flashrom project.
3 *
4 * Copyright (C) 2017 Urja Rannikko <urjaman@gmail.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#ifndef __CUSTOM_BAUD_H__
22#define __CUSTOM_BAUD_H__ 1
23
24struct baudentry {
25 int flag;
26 unsigned int baud;
27};
28
29int set_custom_baudrate(int fd, unsigned int baud);
30
31/* Returns 1 if non-exact rate would be used, and setting a custom rate is supported.
32 The baudtable must be in ascending order and terminated with a 0-baud entry. */
33int use_custom_baud(unsigned int baud, const struct baudentry *baudtable);
34
35#endif