The code you posted uses designated initializers. Although these are far more common when initializing elements of structures or unions, such designators can also be used for array elements.
In fact, this Draft C11 Standard gives an example that is very similar to the code you posted:
6.7.9 Initialization
…
…
33 EXAMPLE 9 Arrays can be initialized to correspond to the elements of an enumeration by using designators:
enum { member_one, member_two };
const char *nm[] = {
[member_two] = "member two",
[member_one] = "member one",
};
You can use such designators to initialize specific sub-objects of aggregate types (like structures and arrays). In the case of structures, those sub-objects will be the individual members; for arrays, they will be elements of the array.
A "non-designated" array initializer will set elements starting from index zero. Thus:
int arr[4] = {1,2,};
will initialize the array elements to 1 2 0 0. However, if you want to only explicitly initialize the second and third elements, then you can use a designator:
int arr[4] = { [1] = 1, 2 };
Note that, after any given designator, subsequent (non-designated) initial values will be applied to subsequent elements, in order, so the above line will set the initial values of arr to 0 1 2 0, respectively.
One can 'mix and mingle' designated and non-designated initialization:
int arr[4] = { [1] = 1, [3] = 2 };
This will set the elements to 0 1 0 2. In each of the above three examples, all elements not explicitly initialized will be implicitly initialized to the values they would have if they were declared as static (which will be zero for int data).
typedef unsigned char u8;right after#include <stdint.h>? Just use the standarduint8_t. (For the pedants: Yes,uint8_tmight not exist, but if it doesn'tu8isn't likely to be 8 bits either...)0and increment by1for each successive step (if not specified otherwise). In your case,RAis0,R1is1...PCis4