Skip to content

Commit

Permalink
add room for optional files
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Sep 29, 2023
1 parent 92e6453 commit de4699c
Show file tree
Hide file tree
Showing 23 changed files with 52 additions and 3 deletions.
11 changes: 8 additions & 3 deletions compiler/src/board.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ function deviceConfigToMarkdown(
const { id } = spec || {}
const boardJson = normalizeDeviceConfig(board, { ignoreFirmwareUrl: true })
const info = boardInfo(board, arch)
const fdevId = boardIdToFilename(devId)

if (info.errors?.length) {
console.error(`errors in ${board.id}:\n${info.errors.join("\n")}`)
Expand All @@ -149,9 +150,9 @@ description: ${devName}
: undefined,
`\n## Features\n`,
...info.features.map(f => `- ${f}`),
`{@import optional ./${id}-features.mdp}`,
`{@import optional ./${fdevId}-features.mdp}`,
...info.services.map(f => `- Service: ${f}`),
`{@import optional ./${id}-services.mdp}`,
`{@import optional ./${fdevId}-services.mdp}`,
!boardJson.i2c &&
`
:::caution
Expand Down Expand Up @@ -212,6 +213,10 @@ ${JSON.stringify(boardJson, null, 4)}
}
}

function boardIdToFilename(boardid: string) {
return boardid.replace(/_/g, "-")
}

export function boardMarkdownFiles() {
const buildConfig = resolveBuildConfig()
const { boards, archs } = buildConfig
Expand All @@ -225,7 +230,7 @@ export function boardMarkdownFiles() {
const spec: jdspec.DeviceSpec =
catalog.specificationFromProductIdentifier(parseAnyInt(productId))
const aid = architectureFamily(archId)
const pa = `${aid}/${boardid.replace(/_/g, "-")}`
const pa = `${aid}/${boardIdToFilename(boardid)}`
r[`${pa}.mdx`] = deviceConfigToMarkdown(
board,
archs[board.archId],
Expand Down
2 changes: 2 additions & 0 deletions website/docs/devices/esp32/adafruit-feather-esp32-s2.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ A S2 Feather from Adafruit. (untested)
- I2C on SDA/SCL using Qwiic connector
- WS2812B RGB LED on pin 33 (use [setStatusLight](/developer/status-light) to control)
- Serial logging on pin 43 at 115200 8N1
{@import optional ./adafruit-feather-esp32-s2-features.mdp}
{@import optional ./adafruit-feather-esp32-s2-services.mdp}

## Stores

Expand Down
2 changes: 2 additions & 0 deletions website/docs/devices/esp32/adafruit-qt-py-c3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ A tiny ESP32-C3 board.
- I2C on SDA_D4/SCL_D5 using Qwiic connector
- WS2812B RGB LED on pin 2 (use [setStatusLight](/developer/status-light) to control)
- Serial logging on pin TX_D6 at 115200 8N1
{@import optional ./adafruit-qt-py-c3-features.mdp}
- Service: buttonBOOT (button)
{@import optional ./adafruit-qt-py-c3-services.mdp}

## Stores

Expand Down
2 changes: 2 additions & 0 deletions website/docs/devices/esp32/esp32-bare.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Bare ESP32 without any default functions for pins.

## Features

{@import optional ./esp32-bare-features.mdp}
{@import optional ./esp32-bare-services.mdp}

:::caution

Expand Down
2 changes: 2 additions & 0 deletions website/docs/devices/esp32/esp32-c3fh4-rgb.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ A tiny ESP32-C3 board with 5x5 LED array.
- I2C on 0/1 using Qwiic connector
- LED on pin 10 (use [setStatusLight](/developer/status-light) to control)
- Serial logging on pin 21 at 115200 8N1
{@import optional ./esp32-c3fh4-rgb-features.mdp}
- Service: buttonBOOT (button)
{@import optional ./esp32-c3fh4-rgb-services.mdp}

## Stores

Expand Down
2 changes: 2 additions & 0 deletions website/docs/devices/esp32/esp32-devkit-c.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ There are currently issues with serial chip on these, best avoid. ESP32-DevKitC
## Features

- LED on pin 2 (use [setStatusLight](/developer/status-light) to control)
{@import optional ./esp32-devkit-c-features.mdp}
- Service: buttonIO0 (button)
{@import optional ./esp32-devkit-c-services.mdp}

:::caution

Expand Down
2 changes: 2 additions & 0 deletions website/docs/devices/esp32/esp32c3-bare.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ A bare ESP32-C3 board without any pin functions.
## Features

- Serial logging on pin P21 at 115200 8N1
{@import optional ./esp32c3-bare-features.mdp}
- Service: buttonBOOT (button)
{@import optional ./esp32c3-bare-services.mdp}

:::caution

Expand Down
2 changes: 2 additions & 0 deletions website/docs/devices/esp32/esp32c3-rust-devkit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ A ESP32-C3 dev-board from Espressif with IMU and Temp/Humidity sensor, originall
- I2C on 10/8 using Header connector
- WS2812B RGB LED on pin 2 (use [setStatusLight](/developer/status-light) to control)
- Serial logging on pin P21 at 115200 8N1
{@import optional ./esp32c3-rust-devkit-features.mdp}
- Service: buttonBOOT (button)
{@import optional ./esp32c3-rust-devkit-services.mdp}

## Stores

Expand Down
2 changes: 2 additions & 0 deletions website/docs/devices/esp32/esp32s2-bare.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ A bare ESP32-S2 board without any pin functions.
## Features

- Serial logging on pin P43 at 115200 8N1
{@import optional ./esp32s2-bare-features.mdp}
{@import optional ./esp32s2-bare-services.mdp}

:::caution

Expand Down
2 changes: 2 additions & 0 deletions website/docs/devices/esp32/esp32s3-bare.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ A bare ESP32-S3 board without any pin functions.
## Features

- Serial logging on pin P43 at 115200 8N1
{@import optional ./esp32s3-bare-features.mdp}
{@import optional ./esp32s3-bare-services.mdp}

:::caution

Expand Down
2 changes: 2 additions & 0 deletions website/docs/devices/esp32/esp32s3-devkit-m.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ ESP32-S3 DevKitM development board. Should also work for DevKitC.

- WS2812B RGB LED on pin P48 (use [setStatusLight](/developer/status-light) to control)
- Serial logging on pin P43 at 115200 8N1
{@import optional ./esp32s3-devkit-m-features.mdp}
{@import optional ./esp32s3-devkit-m-services.mdp}

:::caution

Expand Down
2 changes: 2 additions & 0 deletions website/docs/devices/esp32/feather-s2.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ ESP32-S2 based development board in a Feather format.
- I2C on SDA/SCL using Qwiic connector
- LED on pin 40 (use [setStatusLight](/developer/status-light) to control)
- Serial logging on pin TX_D1 at 115200 8N1
{@import optional ./feather-s2-features.mdp}
- Service: buttonBOOT (button)
- Service: ambientLight (analog:lightLevel)
{@import optional ./feather-s2-services.mdp}

## Stores

Expand Down
2 changes: 2 additions & 0 deletions website/docs/devices/esp32/kittenbot-grapebit-esp32c3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ A round board packed with IMU, buzzer, motor control, 4 RGB LEDs, and Jacdac.
- Jacdac on pin 5 using Jacdac connector
- I2C on 6/7
- WS2812B RGB LED on pin 10 (use [setStatusLight](/developer/status-light) to control)
{@import optional ./kittenbot-grapebit-esp32c3-features.mdp}
- Service: buttonA (button)
- Service: buttonB (button)
- Service: music (buzzer)
- Service: M1 (motor)
- Service: M2 (motor)
{@import optional ./kittenbot-grapebit-esp32c3-services.mdp}

## Stores

Expand Down
2 changes: 2 additions & 0 deletions website/docs/devices/esp32/msr207-v42.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ description: MSR JM Brain S2-mini 207 v4.2
- Jacdac on pin 17 using Jacdac connector
- RGB LED on pins 8, 7, 6 (use [setStatusLight](/developer/status-light) to control)
- Serial logging on pin 43 at 115200 8N1
{@import optional ./msr207-v42-features.mdp}
- Service: power (auto-start)
{@import optional ./msr207-v42-services.mdp}

:::caution

Expand Down
2 changes: 2 additions & 0 deletions website/docs/devices/esp32/msr207-v43.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ description: MSR JM Brain S2-mini 207 v4.3
- Jacdac on pin 17 using Jacdac connector
- RGB LED on pins 8, 7, 6 (use [setStatusLight](/developer/status-light) to control)
- Serial logging on pin 43 at 115200 8N1
{@import optional ./msr207-v43-features.mdp}
- Service: power (auto-start)
{@import optional ./msr207-v43-services.mdp}

:::caution

Expand Down
2 changes: 2 additions & 0 deletions website/docs/devices/esp32/msr48.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ description: MSR JacdacIoT 48 v0.2
- I2C on 9/10 using Qwiic connector
- RGB LED on pins 8, 7, 6 (use [setStatusLight](/developer/status-light) to control)
- Serial logging on pin 43 at 115200 8N1
{@import optional ./msr48-features.mdp}
- Service: power (auto-start)
{@import optional ./msr48-services.mdp}

## Stores

Expand Down
2 changes: 2 additions & 0 deletions website/docs/devices/esp32/seeed-xiao-esp32c3-msr218.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ A tiny ESP32-C3 board mounted on base with Jacdac, Qwiic and Grove connectors.
- I2C on SDA/SCL using Qwiic connector
- WS2812B RGB LED on pin LED (use [setStatusLight](/developer/status-light) to control)
- Serial logging on pin TX at 115200 8N1
{@import optional ./seeed-xiao-esp32c3-msr218-features.mdp}
{@import optional ./seeed-xiao-esp32c3-msr218-services.mdp}

## Stores

Expand Down
2 changes: 2 additions & 0 deletions website/docs/devices/esp32/seeed-xiao-esp32c3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ A tiny ESP32-C3 board.
## Features

- Serial logging on pin TX_D6 at 115200 8N1
{@import optional ./seeed-xiao-esp32c3-features.mdp}
- Service: buttonBOOT (button)
{@import optional ./seeed-xiao-esp32c3-services.mdp}

:::caution

Expand Down
2 changes: 2 additions & 0 deletions website/docs/devices/rp2040/kittenbot-nanoscript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ A RP2040 board featuring a Jacdac connector, compatible with SMT-mounting.
- Jacdac on pin 9 using Jacdac connector
- RGB LED on pins 16, 14, 15 (use [setStatusLight](/developer/status-light) to control)
- Serial logging on pin 0 at 115200 8N1
{@import optional ./kittenbot-nanoscript-features.mdp}
- Service: power (auto-start)
{@import optional ./kittenbot-nanoscript-services.mdp}

:::caution

Expand Down
2 changes: 2 additions & 0 deletions website/docs/devices/rp2040/msr124.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ Prototype board
- Jacdac on pin 9 using Jacdac connector
- RGB LED on pins 16, 14, 15 (use [setStatusLight](/developer/status-light) to control)
- Serial logging on pin 0 at 115200 8N1
{@import optional ./msr124-features.mdp}
- Service: power (auto-start)
{@import optional ./msr124-services.mdp}

:::caution

Expand Down
2 changes: 2 additions & 0 deletions website/docs/devices/rp2040/msr59.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ Prototype board
- Jacdac on pin 9 using Jacdac connector
- RGB LED on pins 11, 13, 15 (use [setStatusLight](/developer/status-light) to control)
- Serial logging on pin 2 at 115200 8N1
{@import optional ./msr59-features.mdp}
- Service: power (auto-start)
{@import optional ./msr59-services.mdp}

:::caution

Expand Down
2 changes: 2 additions & 0 deletions website/docs/devices/rp2040/pico-w.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ RP2040 board from Raspberry Pi with a WiFi chip.
## Features

- custom LED (use [setStatusLight](/developer/status-light) to control)
{@import optional ./pico-w-features.mdp}
{@import optional ./pico-w-services.mdp}

:::caution

Expand Down
2 changes: 2 additions & 0 deletions website/docs/devices/rp2040/pico.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ RP2040 board from Raspberry Pi.
## Features

- custom LED (use [setStatusLight](/developer/status-light) to control)
{@import optional ./pico-features.mdp}
{@import optional ./pico-services.mdp}

:::caution

Expand Down

0 comments on commit de4699c

Please sign in to comment.