This is a part of the Kinetiszer project.

Dependents:   SoundEngine

Committer:
Clemo
Date:
Tue Oct 28 12:19:22 2014 +0000
Revision:
0:5a419ba2726d
Error & warning free (I believe as I don't know how to clean).

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Clemo 0:5a419ba2726d 1 /*
Clemo 0:5a419ba2726d 2 * @brief Serial port driver
Clemo 0:5a419ba2726d 3 *
Clemo 0:5a419ba2726d 4 * @note
Clemo 0:5a419ba2726d 5 * Copyright (C) Elektor, 2014
Clemo 0:5a419ba2726d 6 * All rights reserved.
Clemo 0:5a419ba2726d 7 *
Clemo 0:5a419ba2726d 8 * @par
Clemo 0:5a419ba2726d 9 * This software is supplied "AS IS" without any warranties of any kind,
Clemo 0:5a419ba2726d 10 * and Elektor and its licensor disclaim any and all warranties, express
Clemo 0:5a419ba2726d 11 * or implied, including all implied warranties of merchantability,
Clemo 0:5a419ba2726d 12 * fitness for a particular purpose and non-infringement of intellectual
Clemo 0:5a419ba2726d 13 * property rights. Elektor assumes no responsibility or liability for
Clemo 0:5a419ba2726d 14 * the use of the software, conveys no license or rights under any patent,
Clemo 0:5a419ba2726d 15 * copyright, mask work right, or any other intellectual property rights in
Clemo 0:5a419ba2726d 16 * or to any products. Elektor reserves the right to make changes in the
Clemo 0:5a419ba2726d 17 * software without notification. Elektor also makes no representation or
Clemo 0:5a419ba2726d 18 * warranty that such application will be suitable for the specified use
Clemo 0:5a419ba2726d 19 * without further testing or modification.
Clemo 0:5a419ba2726d 20 *
Clemo 0:5a419ba2726d 21 * @par
Clemo 0:5a419ba2726d 22 * Permission to use, copy, modify, and distribute this software and its
Clemo 0:5a419ba2726d 23 * documentation is hereby granted, under Elektor's and its licensor's
Clemo 0:5a419ba2726d 24 * relevant copyrights in the software, without fee. This copyright,
Clemo 0:5a419ba2726d 25 * permission, and disclaimer notice must appear in all copies of this code.
Clemo 0:5a419ba2726d 26 */
Clemo 0:5a419ba2726d 27
Clemo 0:5a419ba2726d 28 #ifndef __SERIAL_H__
Clemo 0:5a419ba2726d 29 #define __SERIAL_H__
Clemo 0:5a419ba2726d 30
Clemo 0:5a419ba2726d 31
Clemo 0:5a419ba2726d 32 // Emulation of some Arduino Serial class methods.
Clemo 0:5a419ba2726d 33 typedef struct
Clemo 0:5a419ba2726d 34 {
Clemo 0:5a419ba2726d 35 size_t (*write)(uint8_t value);
Clemo 0:5a419ba2726d 36 int (*read)(void);
Clemo 0:5a419ba2726d 37 void (*flush)(void);
Clemo 0:5a419ba2726d 38 int (*available)(void);
Clemo 0:5a419ba2726d 39 void (*begin)(uint32_t baudrate);
Clemo 0:5a419ba2726d 40 }
Clemo 0:5a419ba2726d 41 serial2_t;
Clemo 0:5a419ba2726d 42
Clemo 0:5a419ba2726d 43 extern const serial2_t Serial;
Clemo 0:5a419ba2726d 44
Clemo 0:5a419ba2726d 45
Clemo 0:5a419ba2726d 46 #endif // __SERIAL_H__