Naze32 clone with Frysky receiver
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

objects.h 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /* mbed Microcontroller Library
  2. * Copyright (c) 2006-2013 ARM Limited
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef MBED_OBJECTS_H
  17. #define MBED_OBJECTS_H
  18. #include "cmsis.h"
  19. #include "PortNames.h"
  20. #include "PeripheralNames.h"
  21. #include "PinNames.h"
  22. #include "gpio_object.h"
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26. struct gpio_irq_s {
  27. uint32_t port;
  28. uint32_t pin;
  29. uint32_t ch;
  30. };
  31. struct port_s {
  32. __IO uint32_t *reg_dir;
  33. __IO uint32_t *reg_out;
  34. __I uint32_t *reg_in;
  35. PortName port;
  36. uint32_t mask;
  37. };
  38. struct pwmout_s {
  39. __IO uint32_t *MR;
  40. PWMName pwm;
  41. };
  42. struct serial_s {
  43. LPC_UART_TypeDef *uart;
  44. int index;
  45. };
  46. struct analogin_s {
  47. ADCName adc;
  48. };
  49. struct dac_s {
  50. DACName dac;
  51. };
  52. struct can_s {
  53. LPC_CAN_TypeDef *dev;
  54. int index;
  55. };
  56. struct i2c_s {
  57. LPC_I2C_TypeDef *i2c;
  58. };
  59. struct spi_s {
  60. LPC_SSP_TypeDef *spi;
  61. };
  62. #ifdef __cplusplus
  63. }
  64. #endif
  65. #endif