Move .c files to .cpp in demo folder

This commit is contained in:
Aadi Desai 2023-05-12 17:44:43 +01:00
parent b7d2f6079f
commit d1884c6ac8
No known key found for this signature in database
3 changed files with 8 additions and 8 deletions

View file

@ -144,7 +144,7 @@ static void led_cmd(void) {
#endif #endif
#ifdef CSR_LEDS_BASE #ifdef CSR_LEDS_BASE
extern void leds(int); extern "C" void leds(int);
static void leds_cmd(char **val) { static void leds_cmd(char **val) {
int value = (int)strtol(get_token(val), NULL, 0); int value = (int)strtol(get_token(val), NULL, 0);
@ -153,7 +153,7 @@ static void leds_cmd(char **val) {
} }
#endif #endif
#ifdef CSR_AUDIO_BASE #ifdef CSR_AUDIO_BASE
extern void audio(int); extern "C" void audio(int);
static void audio_cmd(char **val) { static void audio_cmd(char **val) {
int value = (int)strtol(get_token(val), NULL, 0); int value = (int)strtol(get_token(val), NULL, 0);
@ -162,21 +162,21 @@ static void audio_cmd(char **val) {
} }
#endif #endif
extern void donut(void); extern "C" void donut(void);
static void donut_cmd(void) { static void donut_cmd(void) {
printf("Donut demo...\n"); printf("Donut demo...\n");
donut(); donut();
} }
extern void helloc(void); extern "C" void helloc(void);
static void helloc_cmd(void) { static void helloc_cmd(void) {
printf("Hello C demo...\n"); printf("Hello C demo...\n");
helloc(); helloc();
} }
extern void hellocpp(void); extern "C" void hellocpp(void);
static void hellocpp_cmd(void) { static void hellocpp_cmd(void) {
printf("Hello C++ demo...\n"); printf("Hello C++ demo...\n");