Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 

59 linhas
1.5 KiB

  1. /*
  2. * File: DigitalIO_Fubarino.h
  3. * Author: JF
  4. *
  5. * Created on November 24, 2018, 3:20 PM
  6. */
  7. #ifndef DIGITALIO_FUBARINO_H
  8. #define DIGITALIO_FUBARINO_H
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. /* ************************************************************************** */
  13. /* Includes */
  14. #include "define.h"
  15. /* ************************************************************************** */
  16. /* Defines */
  17. #define SYS_FREQ (80000000L) //Clock period = 12.5 ns
  18. #define PERIPHERAL_FREQ (80000000L)
  19. //Output pins hardware definitions
  20. //
  21. #define HEARTBEAT_LED_1_PIN_DIR TRISEbits.TRISE5
  22. #define HEARTBEAT_LED_1_PIN LATEbits.LATE5
  23. #define HEARTBEAT_LED_1_TOGGLE_REG LATEINV
  24. #define HEARTBEAT_LED_1_SET_REG LATESET
  25. #define HEARTBEAT_LED_1_CLEAR_REG LATECLR
  26. #define HEARTBEAT_LED_1_TOGGLE_MASK _LATE_LATE5_MASK
  27. #define HEARTBEAT_LED_2_PIN_DIR TRISEbits.TRISE2
  28. #define HEARTBEAT_LED_2_PIN LATEbits.LATE2
  29. #define HEARTBEAT_LED_2_TOGGLE_REG LATEINV
  30. #define HEARTBEAT_LED_2_SET_REG LATESET
  31. #define HEARTBEAT_LED_2_CLEAR_REG LATECLR
  32. #define HEARTBEAT_LED_2_TOGGLE_MASK _LATE_LATE2_MASK
  33. #define SD_SPI_SDO_PIN_DIR TRISGbits.TRISG8
  34. #define SD_SPI_CS_PIN_DIR TRISGbits.TRISG9
  35. #define SD_SPI_CS_PIN LATGbits.LATG9
  36. #define SD_SPI_SDI_PIN_DIR TRISGbits.TRISG7
  37. #define SD_SPI_SCK_PIN_DIR TRISGbits.TRISG6
  38. /* ************************************************************************** */
  39. /* Prototypes */
  40. void InitDigitalIO(void);
  41. #ifdef __cplusplus
  42. }
  43. #endif
  44. #endif /* DIGITALIO_FUBARINO_H */