Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
conductor-rpi-windows-host
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Michael Vernier
conductor-rpi-windows-host
Commits
fbf11fe8
Commit
fbf11fe8
authored
Jul 27, 2015
by
Michael Vernier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial commit
parents
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
75 additions
and
0 deletions
+75
-0
.gitignore
.gitignore
+3
-0
Makefile
Makefile
+43
-0
main.cpp
main.cpp
+29
-0
No files found.
.gitignore
0 → 100644
View file @
fbf11fe8
{{conductor.TargetName}}
.settings/
*.o
Makefile
0 → 100644
View file @
fbf11fe8
# Makefile for Raspberry Pi 2 applications compiled in Windows
TARGET
=
{{
conductor.TargetName
}}
#DEBUG = -g -O0
DEBUG
=
-O3
CC
=
arm-linux-gnueabihf-gcc
CXX
=
arm-linux-gnueabihf-g++
LD
=
$(CXX)
INCLUDE
=
-Ig
:/SysGCC/Raspberry/arm-linux-gnueabihf/sysroot/usr/local/include
-I
.
CFLAGS
=
$(DEBUG)
-Wall
$(INCLUDE)
-Winline
-pipe
-std
=
c++0x
LDFLAGS
=
-Lg
:/SysGCC/Raspberry/arm-linux-gnueabihf/sysroot/usr/local/lib
LDLIBS
=
-lbcm2835
-lpthread
-lm
-ldxl
C_SRC
=
CPP_SRC
=
main.cpp
OBJ
=
$(C_SRC:.c=.o)
$(CPP_SRC:.cpp=.o)
BINS
=
$(SRC:.c=)
all
:
$(TARGET)
$(TARGET)
:
$(OBJ)
@
echo
[
link
]
$(LD)
-o
$@
$(OBJ)
$(LDFLAGS)
$(LDLIBS)
.c.o
:
@
echo
[
CC]
$<
$(CC)
-c
$(CFLAGS)
$<
-o
$@
.cpp.o
:
@
echo
[
CXX]
$<
$(CXX)
-c
$(CFLAGS)
$<
-o
$@
clean
:
@
echo
"[Clean]"
@
rm
-f
$(OBJ)
*
~ core tags
$(BINS)
$(TARGET)
deploy
:
$(TARGET)
scp
$(TARGET)
pi@192.168.0.247:/home/pi/.
main.cpp
0 → 100644
View file @
fbf11fe8
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <bcm2835.h>
using
namespace
std
;
// Pin 18, BCM_24
#define PIN RPI_V2_GPIO_P1_18
#define OUTPUT BCM2835_GPIO_FSEL_OUTP
int
main
(
void
)
{
if
(
!
bcm2835_init
()
)
{
return
1
;
}
bcm2835_gpio_fsel
(
PIN
,
OUTPUT
);
while
(
true
)
{
delay
(
500
);
bcm2835_gpio_write
(
PIN
,
HIGH
);
delay
(
500
);
bcm2835_gpio_write
(
PIN
,
LOW
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment