bsd_usbloader_test.c (246145) | bsd_usbloader_test.c (266887) |
---|---|
1/* $FreeBSD: head/sys/boot/usb/bsd_usbloader_test.c 246145 2013-01-31 11:00:57Z hselasky $ */ | 1/* $FreeBSD: head/sys/boot/usb/bsd_usbloader_test.c 266887 2014-05-30 14:30:52Z hselasky $ */ |
2/*- 3 * Copyright (c) 2013 Hans Petter Selasky. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. --- 11 unchanged lines hidden (view full) --- 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <stdio.h> 28#include <stdint.h> | 2/*- 3 * Copyright (c) 2013 Hans Petter Selasky. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. --- 11 unchanged lines hidden (view full) --- 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <stdio.h> 28#include <stdint.h> |
29#include <stdlib.h> |
|
29#include <time.h> 30 31extern int usleep(int); 32extern void callout_process(int); 33extern void usb_idle(void); 34extern void usb_init(void); 35extern void usb_uninit(void); 36 37#define hz 1000 38 | 30#include <time.h> 31 32extern int usleep(int); 33extern void callout_process(int); 34extern void usb_idle(void); 35extern void usb_init(void); 36extern void usb_uninit(void); 37 38#define hz 1000 39 |
40void * 41usb_malloc(size_t size) 42{ 43 return (malloc(size)); 44} 45 |
|
39void | 46void |
47usb_free(void *ptr) 48{ 49 free(ptr); 50} 51 52void |
|
40DELAY(unsigned int delay) 41{ 42 usleep(delay); 43} 44 45int 46pause(const char *what, int timeout) 47{ --- 33 unchanged lines hidden --- | 53DELAY(unsigned int delay) 54{ 55 usleep(delay); 56} 57 58int 59pause(const char *what, int timeout) 60{ --- 33 unchanged lines hidden --- |