Hello,
for BLE Stack 2.1 in peripheral.h there seems to be a missing header. If you include peripheral.h in a C file with just an include statement to include the "peripheral.h" header, you get errors, complaining about undefined types unit16_t.
I would recommend to include the header that contains the prototypes for a C file as first include statement. This is an easy check to see if the header compiles on its own.
Kind regards,
Torsten