In SDK17.1.0, there is an example called libuarte. Here the example uses UARTE0 to send and receive serial port data, and he is defined as follows.
NRF_LIBUARTE_ASYNC_DEFINE(libuarte, 0, 0, 0, NRF_LIBUARTE_PERIPHERAL_NOT_USED, 255, 3);
Compile and burn this project with no problem。
But if I change the index of UARTE to 1, his definition is as follows.
NRF_LIBUARTE_ASYNC_DEFINE(libuarte, 1, 0, 0, NRF_LIBUARTE_PERIPHERAL_NOT_USED, 255, 3);
When compiling, the compiler reports an error with the following error message.
..\..\..\main.c(82): error: #94: the size of an array must be greater than zero
NRF_LIBUARTE_ASYNC_DEFINE(libuarte, 1, 0, 0, NRF_LIBUARTE_PERIPHERAL_NOT_USED, 255, 3);
..\..\..\main.c: 0 warnings, 1 error
Checked the code and still don't know why the compiler reported this error?