| 1 | /* |
| 2 | * JzBoot: an USB bootloader for JZ series of Ingenic(R) microprocessors. |
| 3 | * Copyright (C) 2010 Sergey Gridassov <grindars@gmail.com> |
| 4 | * |
| 5 | * This program is free software: you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation, either version 3 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 | */ |
| 18 | |
| 19 | #ifndef __DEVMGR__H__ |
| 20 | #define __DEVMGR__H__ |
| 21 | |
| 22 | #include <stdint.h> |
| 23 | |
| 24 | #define INTERFACE_BOOT 0 |
| 25 | #define ENDPOINT_OUT 0x01 |
| 26 | #define ENDPOINT_IN 0x81 |
| 27 | |
| 28 | int is_ingenic(uint16_t vid, uint16_t pid); |
| 29 | |
| 30 | void add_device(uint16_t vid, uint16_t pid, void *data); |
| 31 | void enum_devices(void (*handler)(int idx, uint16_t vid, uint16_t pid, void *data)); |
| 32 | void *get_device(int idx); |
| 33 | |
| 34 | #endif |
| 35 | |