ETrobocon2017 - 片山研究所モデルベース開発推進事業部
str
ev3-api
library
libcpp-test
src
cpp-souce-file-1.cpp
[詳解]
1
#include <cstdio>
2
#include "
libcpp-test.h
"
3
#include "ev3api.h"
4
5
LibSampleClass::LibSampleClass() {
6
member = 0x12345678;
7
}
8
9
void
LibSampleClass::draw() {
10
static
char
buf[256];
11
sprintf(buf,
"Lib Member is 0x%08x."
, member);
12
ev3_lcd_draw_string(buf, 0, 64);
13
}
14
15
extern
void
libcpp_test_cpp_echo_function
(
int
val) {
16
LibSampleClass a;
17
a.draw();
18
printf(
"%s(): %d\n"
, __FUNCTION__, val);
19
}
20
libcpp-test.h
libcpp_test_cpp_echo_function
void libcpp_test_cpp_echo_function(int val)
Definition:
cpp-souce-file-1.cpp:15
構築:
1.8.13