Skip to content

Commit

Permalink
Update for atomvm master
Browse files Browse the repository at this point in the history
  • Loading branch information
pguyot committed Jul 1, 2023
1 parent 6ce067b commit 18f544c
Show file tree
Hide file tree
Showing 15 changed files with 1,273 additions and 196 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ jobs:
- name: Checkout AtomVM
uses: actions/checkout@v3
with:
repository: pguyot/AtomVM
ref: w41/smp-support
repository: atomvm/AtomVM
path: AtomVM
- name: Checkout M5Unified
uses: actions/checkout@v3
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/doc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build and deploy documentation

on:
push:
branches: ["main"]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
doc:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
container: erlang:26
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Build edoc
run: |
rebar3 edoc
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: doc
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,5 @@ modules.order
Module.symvers
Mkfile.old
dkms.conf

.DS_Store
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

set(ATOMVM_M5_COMPONENT_SRCS
"nifs/atomvm_m5.cc"
"nifs/atomvm_m5_display.cc"
"nifs/atomvm_m5_i2c.cc"
"nifs/atomvm_m5_power.cc"
"nifs/atomvm_m5_power_axp192.cc"
"nifs/atomvm_m5_rtc.cc"
"nifs/atomvm_m5_speaker.cc"
)

idf_component_register(
Expand All @@ -10,6 +16,8 @@ idf_component_register(
PRIV_REQUIRES "libatomvm" "avm_sys" "main" "M5Unified"
)

target_compile_features(${COMPONENT_LIB} INTERFACE cxx_std_14)

idf_build_set_property(
LINK_OPTIONS "-Wl,--whole-archive ${CMAKE_CURRENT_BINARY_DIR}/lib${COMPONENT_NAME}.a -Wl,--no-whole-archive"
APPEND
Expand Down
36 changes: 36 additions & 0 deletions Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,40 @@ config AVM_M5_ENABLE
help
Use this parameter to enable or disable the AtomVM M5 driver.

config AVM_M5_DISPLAY_ENABLE
bool "Enable AtomVM M5 driver display API"
default y
help
Use this parameter to enable or disable the AtomVM M5 driver display API.

config AVM_M5_POWER_ENABLE
bool "Enable AtomVM M5 driver power API"
default y
help
Use this parameter to enable or disable the AtomVM M5 driver power API.

config AVM_M5_POWER_AXP192_ENABLE
bool "Enable AtomVM M5 driver power AXP192 API"
default y
help
Use this parameter to enable or disable the AtomVM M5 driver power AXP192 API.

config AVM_M5_I2C_ENABLE
bool "Enable AtomVM M5 driver I2C API"
default y
help
Use this parameter to enable or disable the AtomVM M5 driver I2C API.

config AVM_M5_RTC_ENABLE
bool "Enable AtomVM M5 driver RTC API"
default y
help
Use this parameter to enable or disable the AtomVM M5 driver RTC API.

config AVM_M5_SPEAKER_ENABLE
bool "Enable AtomVM M5 driver speaker API"
default y
help
Use this parameter to enable or disable the AtomVM M5 driver speaker API.

endmenu
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,14 @@ This project is a port of M5Unified for the AtomVM platform.

## Usage

The following modules are currently defined:

```
m5
m5_display
m5_i2c
m5_power
m5_power_axp192
m5_rtc
m5_speaker
```
Loading

0 comments on commit 18f544c

Please sign in to comment.