Skip to content

Instantly share code, notes, and snippets.

@ChristopherRabotin
Created May 22, 2017 02:34
Show Gist options
  • Save ChristopherRabotin/75482a472e7369d5b947cac464b9d4d8 to your computer and use it in GitHub Desktop.
Save ChristopherRabotin/75482a472e7369d5b947cac464b9d4d8 to your computer and use it in GitHub Desktop.
Zephyr cpp demo
/*
* Copyright (c) 2012-2014 Wind River Systems, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr.h>
#include <misc/printk.h>
#include "test.hpp"
void main(void)
{
printk("Hello World! %s\n", CONFIG_ARCH);
hi_from_cpp();
}
#include "test.hpp"
#include <misc/printk.h>
Demo::say_hi(void){
printk("Hello from C++!\n");
};
void hi_from_cpp(void){
Demo d;
d.say_hi();
}
#ifndef _TEST_HPP
#define _TEST_HPP
class Demo{
public:
void say_hi(void);
};
void hi_from_cpp(void);
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment