pca10031.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved.
  2. *
  3. * The information contained herein is property of Nordic Semiconductor ASA.
  4. * Terms and conditions of usage are described in detail in NORDIC
  5. * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
  6. *
  7. * Licensees are granted free, non-transferable use of the information. NO
  8. * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
  9. * the file.
  10. *
  11. */
  12. #ifndef PCA10031_H
  13. #define PCA10031_H
  14. // LEDs definitions for PCA10031
  15. #define LEDS_NUMBER 3
  16. #define LED_START 21
  17. #define LED_RGB_RED 21
  18. #define LED_RGB_GREEN 22
  19. #define LED_RGB_BLUE 23
  20. #define LED_STOP 23
  21. #define LED_RGB_RED_MASK (1<<LED_RGB_RED)
  22. #define LED_RGB_GREEN_MASK (1<<LED_RGB_GREEN)
  23. #define LED_RGB_BLUE_MASK (1<<LED_RGB_BLUE)
  24. #define LEDS_LIST { LED_RGB_RED, LED_RGB_GREEN, LED_RGB_BLUE}
  25. // defining RGB led as 3 single LEDs
  26. #define BSP_LED_0 LED_RGB_RED
  27. #define BSP_LED_1 LED_RGB_GREEN
  28. #define BSP_LED_2 LED_RGB_BLUE
  29. #define BSP_LED_0_MASK (1<<BSP_LED_0)
  30. #define BSP_LED_1_MASK (1<<BSP_LED_1)
  31. #define BSP_LED_2_MASK (1<<BSP_LED_2)
  32. #define LEDS_MASK (BSP_LED_0_MASK | BSP_LED_1_MASK | BSP_LED_2_MASK)
  33. //defines which LEDs are lit when signal is low
  34. #define LEDS_INV_MASK LEDS_MASK
  35. // there are no user buttons
  36. #define BUTTONS_NUMBER 0
  37. #define BUTTONS_LIST {}
  38. #define BUTTONS_MASK 0x00000000
  39. // UART connection with J-Link
  40. #define RX_PIN_NUMBER 11
  41. #define TX_PIN_NUMBER 9
  42. #define CTS_PIN_NUMBER 10
  43. #define RTS_PIN_NUMBER 8
  44. #define HWFC true
  45. // Low frequency clock source to be used by the SoftDevice
  46. #ifdef S210
  47. #define NRF_CLOCK_LFCLKSRC NRF_CLOCK_LFCLKSRC_XTAL_20_PPM
  48. #else
  49. #define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \
  50. .rc_ctiv = 0, \
  51. .rc_temp_ctiv = 0, \
  52. .xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}
  53. #endif
  54. #endif