Skip to content

Commit

Permalink
Merge pull request #1 from maxgerhardt/main
Browse files Browse the repository at this point in the history
Housekeeping and CI
  • Loading branch information
hexaedron authored Aug 20, 2024
2 parents 1924048 + 1ad1580 commit ffcdbe0
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 9 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build Firmware

on: [push, pull_request]

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install dependencies
run: |
pip install -U https://github.com/platformio/platformio/archive/develop.zip
- name: Build firmware
run: |
pio run
File renamed without changes.
9 changes: 8 additions & 1 deletion include/pack_settings.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#ifndef _PACK_SETTINGS_H_
#define _PACK_SETTINGS_H_

#include <stdint.h>

uint8_t getBrigtness(void);

uint16_t getScreenChangeSeconds_x5(void);

void packSettings(uint8_t brigtnness, uint16_t screenChangeSeconds_x5, uint8_t& data0, uint8_t& data1);
void packSettings(uint8_t brigtnness, uint16_t screenChangeSeconds_x5, uint8_t& data0, uint8_t& data1);

#endif
12 changes: 5 additions & 7 deletions platformio.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
; see https://docs.platformio.org/en/latest/projectconf/index.html
[platformio]
src_dir = .
include_dir = .


[env]
platform = https://github.com/Community-PIO-CH32V/platform-ch32v.git
Expand All @@ -17,10 +13,12 @@ extends = fun_base
[fun_base]
board_build.ldscript = home_bme280.ld
build_flags = -flto -Ich32v003fun/ch32v003fun -Ifunny_libs -I/usr/arm-none-eabi/include -lgcc -Iextralibs -Os -Wl,--print-memory-usage -ffunction-sections -fdata-sections -DCPLUSPLUS
build_src_filter = +<ch32v003fun/ch32v003fun> +<funny_libs>
; fixes conflict with memcpy() function of compiler's libc_nano.a library
build_unflags = --specs=nano.specs
; these paths are relative to "$PROJECT_DIR/src"
build_src_filter = +<../ch32v003fun/ch32v003fun> +<../funny_libs>
board_build.cpp_support = yes



[env:home_bme280]
build_src_filter = ${fun_base.build_src_filter} +<src>
build_src_filter = ${fun_base.build_src_filter} +<.>
2 changes: 1 addition & 1 deletion src/home_bme280.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "optiondata.h"
#include "funny_time.h"

#include "include/pack_settings.h"
#include "pack_settings.h"

#include <stdbool.h>
#include <cstdlib>
Expand Down

0 comments on commit ffcdbe0

Please sign in to comment.