Skip to content

Commit 030e414

Browse files
authored
Merge pull request #3 from k8188219/main
Add BT33 module as receiver
2 parents 4bbbcbf + 9298f0e commit 030e414

File tree

4 files changed

+119
-28
lines changed

4 files changed

+119
-28
lines changed

.github/workflows/githubci.yml

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Build
22

33
on:
4+
workflow_dispatch:
45
pull_request:
56
push:
67
repository_dispatch:
@@ -33,36 +34,36 @@ jobs:
3334
matrix:
3435
board: ${{ fromJSON(needs.set-matrix.outputs.matrix) }}
3536
steps:
36-
- name: Checkout Code
37-
uses: actions/checkout@v4
38-
with:
39-
fetch-depth: 0
40-
submodules: true
37+
- name: Checkout Code
38+
uses: actions/checkout@v4
39+
with:
40+
fetch-depth: 0
41+
submodules: true
4142

42-
- name: Install ARM GCC
43-
uses: carlosperate/arm-none-eabi-gcc-action@v1
44-
with:
45-
release: '12.3.Rel1'
43+
- name: Install ARM GCC
44+
uses: carlosperate/arm-none-eabi-gcc-action@v1
45+
with:
46+
release: 12.3.Rel1
4647

47-
- name: Install Tools
48-
run: |
49-
pip3 install adafruit-nrfutil uritemplate requests intelhex setuptools
48+
- name: Install Tools
49+
run: |
50+
pip3 install adafruit-nrfutil uritemplate requests intelhex setuptools
5051
51-
- name: Build
52-
run: |
53-
make BOARD=${{ matrix.board }} all
54-
make BOARD=${{ matrix.board }} copy-artifact
52+
- name: Build
53+
run: |
54+
make BOARD=${{ matrix.board }} all
55+
make BOARD=${{ matrix.board }} copy-artifact
5556
56-
- uses: actions/upload-artifact@v4
57-
with:
58-
name: ${{ matrix.board }}
59-
path: _bin/${{ matrix.board }}
57+
- uses: actions/upload-artifact@v4
58+
with:
59+
name: ${{ matrix.board }}
60+
path: _bin/${{ matrix.board }}
6061

61-
- name: Upload Release Asset
62-
uses: softprops/action-gh-release@v1
63-
if: ${{ github.event_name == 'release' }}
64-
with:
65-
files: |
66-
_bin/${{ matrix.board }}/${{ matrix.board }}_bootloader-*.zip
67-
_bin/${{ matrix.board }}/${{ matrix.board }}_bootloader-*.hex
68-
_bin/${{ matrix.board }}/update-${{ matrix.board }}_bootloader-*.uf2
62+
- name: Upload Release Asset
63+
uses: softprops/action-gh-release@v1
64+
if: ${{ github.event_name == 'release' }}
65+
with:
66+
files: |
67+
_bin/${{ matrix.board }}/${{ matrix.board }}_bootloader-*.zip
68+
_bin/${{ matrix.board }}/${{ matrix.board }}_bootloader-*.hex
69+
_bin/${{ matrix.board }}/update-${{ matrix.board }}_bootloader-*.uf2
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/*
2+
* The MIT License (MIT)
3+
*
4+
* Copyright (c) 2018 Ha Thach for Adafruit Industries
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in
14+
* all copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
* THE SOFTWARE.
23+
*/
24+
25+
#ifndef _SLIMENRF_RECEIVER_BT33_BOARD_H
26+
#define _SLIMENRF_RECEIVER_BT33_BOARD_H
27+
28+
#define _PINNUM(port, pin) ((port)*32 + (pin))
29+
30+
/*------------------------------------------------------------------*/
31+
/* DC/DC -- Board have no inductor. Dont enable DCDC.
32+
*------------------------------------------------------------------*/
33+
34+
#define ENABLE_DCDC_1 0
35+
#define ENABLE_DCDC_0 0
36+
37+
/*------------------------------------------------------------------*/
38+
/* LED -- No LED
39+
*------------------------------------------------------------------*/
40+
#define LEDS_NUMBER 0
41+
42+
/*------------------------------------------------------------------*/
43+
/* BUTTON
44+
*------------------------------------------------------------------*/
45+
#define BUTTONS_NUMBER 2
46+
#define BUTTON_1 _PINNUM(0, 30)
47+
#define BUTTON_2 _PINNUM(0, 18) // unusable: RESET
48+
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP
49+
50+
//--------------------------------------------------------------------+
51+
// BLE OTA
52+
//--------------------------------------------------------------------+
53+
#define BLEDIS_MANUFACTURER "DX-SMART"
54+
#define BLEDIS_MODEL "SlimeVR NRF Receiver BT33"
55+
56+
//--------------------------------------------------------------------+
57+
// USB
58+
//--------------------------------------------------------------------+
59+
#define USB_DESC_VID 0x1209
60+
#define USB_DESC_UF2_PID 0x7633
61+
#define USB_DESC_CDC_ONLY_PID 0x7633
62+
63+
//------------- UF2 -------------//
64+
#define UF2_PRODUCT_NAME "SlimeVR NRF Receiver BT33"
65+
#define UF2_VOLUME_LABEL "SLIMENRF"
66+
#define UF2_BOARD_ID "slimevr-receiver-bt33"
67+
#define UF2_INDEX_URL "https://docs.shinebright.dev/diy/smol-slime.html"
68+
69+
#endif
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
MCU_SUB_VARIANT = nrf52833
2+
SD_VERSION = 7.3.0
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include "boards.h"
2+
#include "uf2/configkeys.h"
3+
4+
__attribute__((used, section(".bootloaderConfig")))
5+
const uint32_t bootloaderConfig[] =
6+
{
7+
/* CF2 START */
8+
CFG_MAGIC0, CFG_MAGIC1, // magic
9+
5, 100, // used entries, total entries
10+
11+
204, 0x80000, // FLASH_BYTES
12+
205, 0x20000, // RAM_BYTES
13+
208, (USB_DESC_VID << 16) | USB_DESC_UF2_PID, // BOOTLOADER_BOARD_ID = USB VID+PID, used for verification when updating bootloader via uf2
14+
209, 0x621e937a, // UF2_FAMILY = 0x621e937a
15+
210, 0x20, // PINS_PORT_SIZE = PA_32
16+
17+
0, 0, 0, 0, 0, 0, 0, 0
18+
/* CF2 END */
19+
};

0 commit comments

Comments
 (0)