Keyboard firmwares for Atmel AVR and Cortex-M
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

ohci_wrapp_RZ_A1.h 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* Copyright (c) 2010-2011 mbed.org, MIT License
  2. *
  3. * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
  4. * and associated documentation files (the "Software"), to deal in the Software without
  5. * restriction, including without limitation the rights to use, copy, modify, merge, publish,
  6. * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
  7. * Software is furnished to do so, subject to the following conditions:
  8. *
  9. * The above copyright notice and this permission notice shall be included in all copies or
  10. * substantial portions of the Software.
  11. *
  12. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
  13. * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  14. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  15. * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  16. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  17. */
  18. #ifndef OHCI_WRAPP_RZ_A1_H
  19. #define OHCI_WRAPP_RZ_A1_H
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. #define OHCI_REG_REVISION (0x00) /* HcRevision */
  24. #define OHCI_REG_CONTROL (0x04) /* HcControl */
  25. #define OHCI_REG_COMMANDSTATUS (0x08) /* HcCommandStatus */
  26. #define OHCI_REG_INTERRUPTSTATUS (0x0C) /* HcInterruptStatus */
  27. #define OHCI_REG_INTERRUPTENABLE (0x10) /* HcInterruptEnable */
  28. #define OHCI_REG_INTERRUPTDISABLE (0x14) /* HcInterruptDisable */
  29. #define OHCI_REG_HCCA (0x18) /* HcHCCA */
  30. #define OHCI_REG_PERIODCURRENTED (0x1C) /* HcPeriodCurrentED */
  31. #define OHCI_REG_CONTROLHEADED (0x20) /* HcControlHeadED */
  32. #define OHCI_REG_CONTROLCURRENTED (0x24) /* HcControlCurrentED */
  33. #define OHCI_REG_BULKHEADED (0x28) /* HcBulkHeadED */
  34. #define OHCI_REG_BULKCURRENTED (0x2C) /* HcBulkCurrentED */
  35. #define OHCI_REG_DONEHEADED (0x30) /* HcDoneHead */
  36. #define OHCI_REG_FMINTERVAL (0x34) /* HcFmInterval */
  37. #define OHCI_REG_FMREMAINING (0x38) /* HcFmRemaining */
  38. #define OHCI_REG_FMNUMBER (0x3C) /* HcFmNumber */
  39. #define OHCI_REG_PERIODICSTART (0x40) /* HcPeriodicStart */
  40. #define OHCI_REG_LSTHRESHOLD (0x44) /* HcLSThreshold */
  41. #define OHCI_REG_RHDESCRIPTORA (0x48) /* HcRhDescriptorA */
  42. #define OHCI_REG_RHDESCRIPTORB (0x4C) /* HcRhDescriptorB */
  43. #define OHCI_REG_RHSTATUS (0x50) /* HcRhStatus */
  44. #define OHCI_REG_RHPORTSTATUS1 (0x54) /* HcRhPortStatus1 */
  45. typedef void (usbisr_fnc_t)(void);
  46. extern void ohciwrapp_init(usbisr_fnc_t *p_usbisr_fnc);
  47. extern uint32_t ohciwrapp_reg_r(uint32_t reg_ofs);
  48. extern void ohciwrapp_reg_w(uint32_t reg_ofs, uint32_t set_data);
  49. extern void ohciwrapp_interrupt(uint32_t int_sense);
  50. #ifdef __cplusplus
  51. }
  52. #endif
  53. #endif /* OHCI_WRAPP_RZ_A1_H */