This repository has been archived by the owner on Sep 1, 2022. It is now read-only.
forked from wovo/hwlib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
187 additions
and
543 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
-mcpu=cortex-m3 -mthumb -fomit-frame-pointer -march=armv7-m -Wall -Werror -Wno-maybe-uninitialized -Wno-unused-local-typedefs -Wno-unused-but-set-variable -Wno-unused-local-typedefs -Wno-unused-function -Wno-attributes -Os -fdata-sections -ffunction-sections -I../../../../bmptk/targets/cortex/atmel -I../../../../bmptk/targets/cortex/atmel/sam3xa/include -I../../../library -I../../../../Catch2/single_include -I../../../../Catch2/single_include/catch2 -I../../../../boost_1_69_0 -I../../../../bmptk -I../../../../bmptk/targets -I../../../../bmptk/targets/cortex -I../../../../bmptk/targets/cortex/cmsis -DHWCPP_FAKE_OSTREAM -DDONT_USE_CMSIS_INIT -DBMPTK_INCLUDE_CHIP=sam.h -D__SAM3X8E__ -DBMPTK_TARGET=arduino_due -DBMPTK_TARGET_arduino_due -DHWLIB_TARGET_arduino_due -DHWCPP_TARGET_arduino_due -DGF_TARGET_arduino_due -DBMPTK_CHIP=sam3x8e -DBMPTK_CHIP_sam3x8e -DBMPTK_XTAL=12000 -DBMPTK_BAUDRATE=2400 -DHWLIB_BAUDRATE=2400 -DGODAFOSS_BAUDRATE=2400 -DGF_BAUDRATE=2400 -DBMPTK_VERSION=V04_00_work_in_progress_2020_05_23 -DBMPTK_EMBEDDED -std=c++17 -fconcepts -fno-rtti -fno-exceptions -fno-asynchronous-unwind-tables -fno-threadsafe-statics -fno-use-cxa-get-exception-ptr -fno-use-cxa-atexit -nostdlib -nodefaultlibs | ||
-mcpu=cortex-m3 -mthumb -fomit-frame-pointer -march=armv7-m -Wall -Werror -Wno-maybe-uninitialized -Wno-unused-local-typedefs -Wno-unused-but-set-variable -Wno-unused-local-typedefs -Wno-unused-function -Wno-attributes -Os -fdata-sections -ffunction-sections -IC:\Python36\include -I../../../../bmptk/targets/cortex/atmel -I../../../../bmptk/targets/cortex/atmel/sam3xa/include -I../../../library -I../../../../Catch2/single_include -I../../../../Catch2/single_include/catch2 -I../../../../boost_1_69_0 -I../../../../bmptk -I../../../../bmptk/targets -I../../../../bmptk/targets/cortex -I../../../../bmptk/targets/cortex/cmsis -DHWCPP_FAKE_OSTREAM -DDONT_USE_CMSIS_INIT -DBMPTK_INCLUDE_CHIP=sam.h -D__SAM3X8E__ -DBMPTK_TARGET=arduino_due -DBMPTK_TARGET_arduino_due -DHWLIB_TARGET_arduino_due -DHWCPP_TARGET_arduino_due -DGF_TARGET_arduino_due -DBMPTK_CHIP=sam3x8e -DBMPTK_CHIP_sam3x8e -DBMPTK_XTAL=12000 -DBMPTK_BAUDRATE=2400 -DHWLIB_BAUDRATE=2400 -DGODAFOSS_BAUDRATE=2400 -DGF_BAUDRATE=2400 -DBMPTK_VERSION=V04_00_work_in_progress_2020_05_23 -DBMPTK_EMBEDDED -std=c++17 -fconcepts -fno-rtti -fno-exceptions -fno-asynchronous-unwind-tables -fno-threadsafe-statics -fno-use-cxa-get-exception-ptr -fno-use-cxa-atexit -nostdlib -nodefaultlibs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
-mcpu=cortex-m3 -mthumb -fomit-frame-pointer -march=armv7-m -Wall -Werror -Wno-maybe-uninitialized -Wno-unused-local-typedefs -Wno-unused-but-set-variable -Wno-unused-local-typedefs -Wno-unused-function -Wno-attributes -Os -fdata-sections -ffunction-sections -I../../../../bmptk/targets/cortex/atmel -I../../../../bmptk/targets/cortex/atmel/sam3xa/include -I../../../library -I../../../../Catch2/single_include -I../../../../Catch2/single_include/catch2 -I../../../../boost_1_69_0 -I../../../../bmptk -I../../../../bmptk/targets -I../../../../bmptk/targets/cortex -I../../../../bmptk/targets/cortex/cmsis -DHWCPP_FAKE_OSTREAM -DDONT_USE_CMSIS_INIT -DBMPTK_INCLUDE_CHIP=sam.h -D__SAM3X8E__ -DBMPTK_TARGET=arduino_due -DBMPTK_TARGET_arduino_due -DHWLIB_TARGET_arduino_due -DHWCPP_TARGET_arduino_due -DGF_TARGET_arduino_due -DBMPTK_CHIP=sam3x8e -DBMPTK_CHIP_sam3x8e -DBMPTK_XTAL=12000 -DBMPTK_BAUDRATE=2400 -DHWLIB_BAUDRATE=2400 -DGODAFOSS_BAUDRATE=2400 -DGF_BAUDRATE=2400 -DBMPTK_VERSION=V04_00_work_in_progress_2020_05_23 -DBMPTK_EMBEDDED -lgcc -Wl,-Map,main.map -Wl,--gc-sections -Wl,-fatal-warnings | ||
-mcpu=cortex-m3 -mthumb -fomit-frame-pointer -march=armv7-m -Wall -Werror -Wno-maybe-uninitialized -Wno-unused-local-typedefs -Wno-unused-but-set-variable -Wno-unused-local-typedefs -Wno-unused-function -Wno-attributes -Os -fdata-sections -ffunction-sections -IC:\Python36\include -I../../../../bmptk/targets/cortex/atmel -I../../../../bmptk/targets/cortex/atmel/sam3xa/include -I../../../library -I../../../../Catch2/single_include -I../../../../Catch2/single_include/catch2 -I../../../../boost_1_69_0 -I../../../../bmptk -I../../../../bmptk/targets -I../../../../bmptk/targets/cortex -I../../../../bmptk/targets/cortex/cmsis -DHWCPP_FAKE_OSTREAM -DDONT_USE_CMSIS_INIT -DBMPTK_INCLUDE_CHIP=sam.h -D__SAM3X8E__ -DBMPTK_TARGET=arduino_due -DBMPTK_TARGET_arduino_due -DHWLIB_TARGET_arduino_due -DHWCPP_TARGET_arduino_due -DGF_TARGET_arduino_due -DBMPTK_CHIP=sam3x8e -DBMPTK_CHIP_sam3x8e -DBMPTK_XTAL=12000 -DBMPTK_BAUDRATE=2400 -DHWLIB_BAUDRATE=2400 -DGODAFOSS_BAUDRATE=2400 -DGF_BAUDRATE=2400 -DBMPTK_VERSION=V04_00_work_in_progress_2020_05_23 -DBMPTK_EMBEDDED -lgcc -Wl,-Map,main.map -Wl,--gc-sections -Wl,-fatal-warnings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include "hwlib.hpp" | ||
|
||
namespace target = hwlib::target; | ||
|
||
int main( void ){ | ||
|
||
// wait for the terminal emulator to start up | ||
hwlib::wait_ms( 2'000 ); | ||
hwlib::cout << "ST7789 demo\n" << hwlib::flush; | ||
|
||
auto sclk = hwlib::target::pin_out{ hwlib::target::pins::d2 }; | ||
auto mosi = hwlib::target::pin_out{ hwlib::target::pins::d3 };; | ||
|
||
auto spi = hwlib::spi_bus_bit_banged_sclk_mosi_miso{ | ||
sclk, mosi, hwlib::pin_in_dummy }; | ||
|
||
auto dc = hwlib::target::pin_out{ hwlib::target::pins::d4 }; | ||
auto & cs = hwlib::pin_out_dummy; | ||
auto rst = hwlib::target::pin_out{ hwlib::target::pins::d5 }; | ||
|
||
auto display = hwlib::st7789_spi_dc_cs_rst( spi, dc, cs, rst ); | ||
|
||
for(;;){ | ||
hwlib::cout << __LINE__ << "\n"; | ||
display.flush(); | ||
hwlib::wait_ms( 1'000 ); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#============================================================================ | ||
# | ||
# simple project makefile (just a main file) | ||
# | ||
# (c) Wouter van Ooijen ([email protected]) 2017 | ||
# | ||
# Distributed under the Boost Software License, Version 1.0. | ||
# (See accompanying file LICENSE_1_0.txt or copy at | ||
# http://www.boost.org/LICENSE_1_0.txt) | ||
# | ||
#============================================================================ | ||
|
||
# source files in this project (main.* is automatically assumed) | ||
SOURCES := | ||
|
||
# header files in this project | ||
HEADERS := | ||
|
||
# other places to look for files for this project | ||
SEARCH := | ||
|
||
# set RELATIVE to the next higher directory | ||
# and defer to the appropriate Makefile.* there | ||
RELATIVE := .. | ||
include $(RELATIVE)/makefile.link |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.