• 大小: 112KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-17
  • 语言: 其他
  • 标签: 库文件  

资源简介

Arduino下USB设备开发的库文件。头文件主要用于键盘设备的开发 Arduino下USB设备开发的库文件。头文件主要用于键盘设备的开发 The library file of USB device development under Arduino. The header file is mainly used for the development of keyboard devices

资源截图

代码片段和文件信息

/* Name: oddebug.c
 * Project: AVR library
 * Author: Christian Starkjohann
 * Creation Date: 2005-01-16
 * Tabsize: 4
 * Copyright: (c) 2005 by objectIVE DEVELOPMENT Software GmbH
 * License: GNU GPL v2 (see License.txt) GNU GPL v3 or proprietary (CommercialLicense.txt)
 * This Revision: $Id: oddebug.c 692 2008-11-07 15:07:40Z cs $
 */

#include “oddebug.h“

#if DEBUG_LEVEL > 0

#warning “Never compile production devices with debugging enabled“

static void uartPutc(char c)
{
    while(!(ODDBG_USR & (1 << ODDBG_UDRE)));    /* wait for data register empty */
    ODDBG_UDR = c;
}

static uchar    hexAscii(uchar h)
{
    h &= 0xf;
    if(h >= 10)
        h += ‘a‘ - (uchar)10 - ‘0‘;
    h += ‘0‘;
    return h;
}

static void printHex(uchar c)
{
    uartPutc(hexAscii(c >> 4));
    uartPutc(hexAscii(c));
}

void    odDebug(uchar prefix uchar *data uchar len)
{
    printHex(prefix);
    uartPutc(‘:‘);
    while(len--){
        uartPutc(‘ ‘);
        printHex(*data++);
    }
    uartPutc(‘\r‘);
    uartPutc(‘\n‘);
}

#endif

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-06-02 01:37  UsbKeyboard\
     文件        1333  2010-10-17 05:08  UsbKeyboard\ArduinoNotes.txt
     文件        8011  2010-10-17 05:08  UsbKeyboard\asmcommon.inc
     文件       13367  2010-10-17 05:08  UsbKeyboard\Changelog.txt
     文件        7257  2010-10-17 05:08  UsbKeyboard\CommercialLicense.txt
     目录           0  2012-06-02 01:37  UsbKeyboard\examples\
     目录           0  2012-06-02 01:37  UsbKeyboard\examples\UsbKeyboardDemo1\
     文件        1305  2010-10-17 05:08  UsbKeyboard\examples\UsbKeyboardDemo1\UsbKeyboardDemo1.pde
     文件       19126  2010-10-17 05:08  UsbKeyboard\License.txt
     文件        1036  2010-10-17 05:08  UsbKeyboard\oddebug.c
     文件        2976  2010-10-17 05:08  UsbKeyboard\oddebug.h
     文件        7860  2010-10-17 05:08  UsbKeyboard\Readme.txt
     文件        7046  2010-10-17 05:08  UsbKeyboard\USB-ID-FAQ.txt
     文件        6765  2010-10-17 05:08  UsbKeyboard\USB-IDs-for-free.txt
     文件       18328  2010-10-17 05:08  UsbKeyboard\usbconfig-prototype.h
     文件       18328  2010-10-17 05:08  UsbKeyboard\usbconfig.h
     文件       24638  2010-10-17 05:08  UsbKeyboard\usbdrv.c
     文件       31237  2010-10-17 05:08  UsbKeyboard\usbdrv.h
     文件         618  2010-10-17 05:08  UsbKeyboard\usbdrvasm.asm
     文件       11019  2010-10-17 05:08  UsbKeyboard\usbdrvasm.S
     文件       15413  2010-10-17 05:08  UsbKeyboard\usbdrvasm12.inc
     文件       28684  2010-10-17 05:08  UsbKeyboard\usbdrvasm128.inc
     文件       17893  2010-10-17 05:08  UsbKeyboard\usbdrvasm15.inc
     文件       12768  2010-10-17 05:08  UsbKeyboard\usbdrvasm16.inc
     文件       17101  2010-10-17 05:08  UsbKeyboard\usbdrvasm165.inc
     文件       31286  2010-10-17 05:08  UsbKeyboard\usbdrvasm18-crc.inc
     文件       15377  2010-10-17 05:08  UsbKeyboard\usbdrvasm20.inc
     文件        7633  2010-10-17 05:08  UsbKeyboard\USBID-License.txt
     文件        6231  2010-10-17 05:08  UsbKeyboard\UsbKeyboard.h
     文件        4515  2010-10-17 05:08  UsbKeyboard\usbportability.h

评论

共有 条评论