I am attempting to compile some legacy code for the nRF52805, and since adding the flag NRF52805_XXAA compilation fails with the following error:
In file included from ../../SDK/17.1.0/modules/nrfx/drivers/include/nrfx_ppi.h:45,
from ../../SDK/17.1.0/integration/nrfx/legacy/nrf_drv_ppi.h:44,
from ../../SDK/17.1.0/integration/nrfx/legacy/nrf_drv_ppi.c:41:
../../SDK/17.1.0/modules/nrfx/hal/nrf_ppi.h:71:25: error: 'PPI_CHEN_CH10_Pos' undeclared here (not in a function); did you mean 'PPI_CHEN_CH1_Pos'?
71 | NRF_PPI_CHANNEL10 = PPI_CHEN_CH10_Pos, /**< Channel 10. */
| ^~~~~~~~~~~~~~~~~
| PPI_CHEN_CH1_Pos
../../SDK/17.1.0/modules/nrfx/hal/nrf_ppi.h:72:25: error: 'PPI_CHEN_CH11_Pos' undeclared here (not in a function); did you mean 'PPI_CHEN_CH1_Pos'?
72 | NRF_PPI_CHANNEL11 = PPI_CHEN_CH11_Pos, /**< Channel 11. */
| ^~~~~~~~~~~~~~~~~
| PPI_CHEN_CH1_Pos
../../SDK/17.1.0/modules/nrfx/hal/nrf_ppi.h:73:25: error: 'PPI_CHEN_CH12_Pos' undeclared here (not in a function); did you mean 'PPI_CHEN_CH2_Pos'?
73 | NRF_PPI_CHANNEL12 = PPI_CHEN_CH12_Pos, /**< Channel 12. */
| ^~~~~~~~~~~~~~~~~
| PPI_CHEN_CH2_Pos
../../SDK/17.1.0/modules/nrfx/hal/nrf_ppi.h:74:25: error: 'PPI_CHEN_CH13_Pos' undeclared here (not in a function); did you mean 'PPI_CHEN_CH1_Pos'?
74 | NRF_PPI_CHANNEL13 = PPI_CHEN_CH13_Pos, /**< Channel 13. */
| ^~~~~~~~~~~~~~~~~
| PPI_CHEN_CH1_Pos
../../SDK/17.1.0/modules/nrfx/hal/nrf_ppi.h:75:25: error: 'PPI_CHEN_CH14_Pos' undeclared here (not in a function); did you mean 'PPI_CHEN_CH1_Pos'?
75 | NRF_PPI_CHANNEL14 = PPI_CHEN_CH14_Pos, /**< Channel 14. */
| ^~~~~~~~~~~~~~~~~
| PPI_CHEN_CH1_Pos
../../SDK/17.1.0/modules/nrfx/hal/nrf_ppi.h:76:25: error: 'PPI_CHEN_CH15_Pos' undeclared here (not in a function); did you mean 'PPI_CHEN_CH1_Pos'?
76 | NRF_PPI_CHANNEL15 = PPI_CHEN_CH15_Pos, /**< Channel 15. */
| ^~~~~~~~~~~~~~~~~
| PPI_CHEN_CH1_Pos
Which makes sense, since there are only 10 PPI channels available.
The code does only check for an upper limit of 16 channels though:
typedef enum
{
NRF_PPI_CHANNEL0 = PPI_CHEN_CH0_Pos, /**< Channel 0. */
NRF_PPI_CHANNEL1 = PPI_CHEN_CH1_Pos, /**< Channel 1. */
NRF_PPI_CHANNEL2 = PPI_CHEN_CH2_Pos, /**< Channel 2. */
NRF_PPI_CHANNEL3 = PPI_CHEN_CH3_Pos, /**< Channel 3. */
NRF_PPI_CHANNEL4 = PPI_CHEN_CH4_Pos, /**< Channel 4. */
NRF_PPI_CHANNEL5 = PPI_CHEN_CH5_Pos, /**< Channel 5. */
NRF_PPI_CHANNEL6 = PPI_CHEN_CH6_Pos, /**< Channel 6. */
NRF_PPI_CHANNEL7 = PPI_CHEN_CH7_Pos, /**< Channel 7. */
NRF_PPI_CHANNEL8 = PPI_CHEN_CH8_Pos, /**< Channel 8. */
NRF_PPI_CHANNEL9 = PPI_CHEN_CH9_Pos, /**< Channel 9. */
NRF_PPI_CHANNEL10 = PPI_CHEN_CH10_Pos, /**< Channel 10. */
NRF_PPI_CHANNEL11 = PPI_CHEN_CH11_Pos, /**< Channel 11. */
NRF_PPI_CHANNEL12 = PPI_CHEN_CH12_Pos, /**< Channel 12. */
NRF_PPI_CHANNEL13 = PPI_CHEN_CH13_Pos, /**< Channel 13. */
NRF_PPI_CHANNEL14 = PPI_CHEN_CH14_Pos, /**< Channel 14. */
NRF_PPI_CHANNEL15 = PPI_CHEN_CH15_Pos, /**< Channel 15. */
#if (PPI_CH_NUM > 16) || defined(__NRFX_DOXYGEN__)
NRF_PPI_CHANNEL16 = PPI_CHEN_CH16_Pos, /**< Channel 16. */
NRF_PPI_CHANNEL17 = PPI_CHEN_CH17_Pos, /**< Channel 17. */
NRF_PPI_CHANNEL18 = PPI_CHEN_CH18_Pos, /**< Channel 18. */
NRF_PPI_CHANNEL19 = PPI_CHEN_CH19_Pos, /**< Channel 19. */
#endif
NRF_PPI_CHANNEL20 = PPI_CHEN_CH20_Pos, /**< Channel 20. */
NRF_PPI_CHANNEL21 = PPI_CHEN_CH21_Pos, /**< Channel 21. */
NRF_PPI_CHANNEL22 = PPI_CHEN_CH22_Pos, /**< Channel 22. */
NRF_PPI_CHANNEL23 = PPI_CHEN_CH23_Pos, /**< Channel 23. */
NRF_PPI_CHANNEL24 = PPI_CHEN_CH24_Pos, /**< Channel 24. */
NRF_PPI_CHANNEL25 = PPI_CHEN_CH25_Pos, /**< Channel 25. */
NRF_PPI_CHANNEL26 = PPI_CHEN_CH26_Pos, /**< Channel 26. */
NRF_PPI_CHANNEL27 = PPI_CHEN_CH27_Pos, /**< Channel 27. */
NRF_PPI_CHANNEL28 = PPI_CHEN_CH28_Pos, /**< Channel 28. */
NRF_PPI_CHANNEL29 = PPI_CHEN_CH29_Pos, /**< Channel 29. */
NRF_PPI_CHANNEL30 = PPI_CHEN_CH30_Pos, /**< Channel 30. */
NRF_PPI_CHANNEL31 = PPI_CHEN_CH31_Pos /**< Channel 31. */
How can I fix this, considering that I may need PPI?