Skip to content

Commit 5dde383

Browse files
author
brabo
committed
Merging usbh_kbd example from Kuldeep
1 parent f22400d commit 5dde383

File tree

9 files changed

+969
-0
lines changed

9 files changed

+969
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/*
2+
* This file is part of the unicore-mx project.
3+
*
4+
* Copyright (C) 2016 Kuldeep Singh Dhaka <[email protected]>
5+
*
6+
* This library is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU Lesser General Public License as published by
8+
* the Free Software Foundation, either version 3 of the License, or
9+
* (at your option) any later version.
10+
*
11+
* This library 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 Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this library. If not, see <http://www.gnu.org/licenses/>.
18+
*/
19+
20+
#ifndef USBH_KBD_TARGET_H
21+
#define USBH_KBD_TARGET_H
22+
23+
#include <unicore-mx/usbh/usbh.h>
24+
25+
#include <stdint.h>
26+
#include <string.h>
27+
#include <stdlib.h>
28+
#include <stdio.h>
29+
#include <stdarg.h>
30+
#include <inttypes.h>
31+
32+
void usbh_kbd_init(void);
33+
34+
usbh_backend *usbh_kbd_backend(void);
35+
36+
/**
37+
* The timer is expected to
38+
* - count to up
39+
* - counting at 10Khz
40+
* - roll over to 0 on overflow
41+
*/
42+
uint16_t tim_get_counter(void);
43+
44+
void usbh_kbd_before_poll(void);
45+
void usbh_kbd_after_poll(void);
46+
47+
void usart_puts(const char *arg);
48+
void usart_printf(const char *fmt, ...);
49+
void usart_vprintf(const char *fmt, va_list va);
50+
51+
#endif

0 commit comments

Comments
 (0)