Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dnm] Testing syscfg expressions #2804

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 22 additions & 22 deletions hw/bsp/nordic_pca10095/include/bsp/bsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,32 +51,32 @@ extern uint8_t _ram_start;
#define BUTTON_4 (9)

/* Arduino pins */
#define ARDUINO_PIN_D0 32
#define ARDUINO_PIN_D1 33
#define ARDUINO_PIN_D2 36
#define ARDUINO_PIN_D3 37
#define ARDUINO_PIN_D4 38
#define ARDUINO_PIN_D5 39
#define ARDUINO_PIN_D6 40
#define ARDUINO_PIN_D7 41
#define ARDUINO_PIN_D8 42
#define ARDUINO_PIN_D9 43
#define ARDUINO_PIN_D10 44
#define ARDUINO_PIN_D11 45
#define ARDUINO_PIN_D12 46
#define ARDUINO_PIN_D13 47
#define ARDUINO_PIN_A0 4
#define ARDUINO_PIN_A1 5
#define ARDUINO_PIN_A2 6
#define ARDUINO_PIN_A3 7
#define ARDUINO_PIN_A4 25
#define ARDUINO_PIN_A5 26
#define ARDUINO_PIN_D0 MYNEWT_VAL(ARDUINO_PIN_D0)
#define ARDUINO_PIN_D1 MYNEWT_VAL(ARDUINO_PIN_D1)
#define ARDUINO_PIN_D2 MYNEWT_VAL(ARDUINO_PIN_D2)
#define ARDUINO_PIN_D3 MYNEWT_VAL(ARDUINO_PIN_D3)
#define ARDUINO_PIN_D4 MYNEWT_VAL(ARDUINO_PIN_D4)
#define ARDUINO_PIN_D5 MYNEWT_VAL(ARDUINO_PIN_D5)
#define ARDUINO_PIN_D6 MYNEWT_VAL(ARDUINO_PIN_D6)
#define ARDUINO_PIN_D7 MYNEWT_VAL(ARDUINO_PIN_D7)
#define ARDUINO_PIN_D8 MYNEWT_VAL(ARDUINO_PIN_D8)
#define ARDUINO_PIN_D9 MYNEWT_VAL(ARDUINO_PIN_D9)
#define ARDUINO_PIN_D10 MYNEWT_VAL(ARDUINO_PIN_D10)
#define ARDUINO_PIN_D11 MYNEWT_VAL(ARDUINO_PIN_D11)
#define ARDUINO_PIN_D12 MYNEWT_VAL(ARDUINO_PIN_D12)
#define ARDUINO_PIN_D13 MYNEWT_VAL(ARDUINO_PIN_D13)
#define ARDUINO_PIN_A0 MYNEWT_VAL(ARDUINO_PIN_A0)
#define ARDUINO_PIN_A1 MYNEWT_VAL(ARDUINO_PIN_A1)
#define ARDUINO_PIN_A2 MYNEWT_VAL(ARDUINO_PIN_A2)
#define ARDUINO_PIN_A3 MYNEWT_VAL(ARDUINO_PIN_A3)
#define ARDUINO_PIN_A4 MYNEWT_VAL(ARDUINO_PIN_A4)
#define ARDUINO_PIN_A5 MYNEWT_VAL(ARDUINO_PIN_A5)

#define ARDUINO_PIN_RX ARDUINO_PIN_D0
#define ARDUINO_PIN_TX ARDUINO_PIN_D1

#define ARDUINO_PIN_SCL 35
#define ARDUINO_PIN_SDA 34
#define ARDUINO_PIN_SCL MYNEWT_VAL(ARDUINO_PIN_SCL)
#define ARDUINO_PIN_SDA MYNEWT_VAL(ARDUINO_PIN_SDA)

#define ARDUINO_PIN_SCK ARDUINO_PIN_D13
#define ARDUINO_PIN_MOSI ARDUINO_PIN_D11
Expand Down
23 changes: 23 additions & 0 deletions hw/bsp/nordic_pca10095/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,29 @@ syscfg.defs:
can reduce size of crash dump.
value: 0

ARDUINO_PIN_D0: 32
ARDUINO_PIN_D1: 33
ARDUINO_PIN_D2: 36
ARDUINO_PIN_D3: 37
ARDUINO_PIN_D4: 38
ARDUINO_PIN_D5: 39
ARDUINO_PIN_D6: 40
ARDUINO_PIN_D7: 41
ARDUINO_PIN_D8: 42
ARDUINO_PIN_D9: 43
ARDUINO_PIN_D10: 44
ARDUINO_PIN_D11: 45
ARDUINO_PIN_D12: 46
ARDUINO_PIN_D13: 47
ARDUINO_PIN_A0: 4
ARDUINO_PIN_A1: 5
ARDUINO_PIN_A2: 6
ARDUINO_PIN_A3: 7
ARDUINO_PIN_A4: 25
ARDUINO_PIN_A5: 26
ARDUINO_PIN_SCL: 35
ARDUINO_PIN_SDA: 34

syscfg.vals:
# Set default pins for peripherals
UART_0_PIN_TX: 20
Expand Down
8 changes: 4 additions & 4 deletions hw/usb/tinyusb/std_descriptors/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,19 +105,19 @@ syscfg.defs:

USBD_CDC_DESCRIPTOR_STRING:
description: String for CDC interface
value: NULL
value: raw("NULL")

USBD_MSC_DESCRIPTOR_STRING:
description: String for MSC interface
value: NULL
value: raw("NULL")

USBD_HID_DESCRIPTOR_STRING:
description: String for HID interface
value: NULL
value: raw("NULL")

USBD_BTH_DESCRIPTOR_STRING:
description: String for BT descriptor
value: NULL
value: raw("NULL")

USBD_HID_REPORT_EP:
description: HID report endpoint number
Expand Down
2 changes: 1 addition & 1 deletion hw/usb/tinyusb/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ syscfg.defs:
USBD_TASK_PRIORITY:
description: >
USBD task priority
value: 'OS_TASK_PRI_HIGHEST + 2'
value: raw("OS_TASK_PRI_HIGHEST + 2")
USBD_STACK_SIZE:
description: >
Stack size for usbd task
Expand Down
2 changes: 1 addition & 1 deletion sys/console/full/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ syscfg.defs:
value: '115200'
CONSOLE_UART_FLOW_CONTROL:
description: 'Console UART flow control.'
value: 'UART_FLOW_CTL_NONE'
value: raw("UART_FLOW_CTL_NONE")
CONSOLE_UART_TX_BUF_SIZE:
description: 'UART console transmit buffer size; must be power of 2.'
value: 32
Expand Down
2 changes: 1 addition & 1 deletion sys/console/stub/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ syscfg.defs:
value: '115200'
CONSOLE_UART_FLOW_CONTROL:
description: 'Console UART flow control.'
value: 'UART_FLOW_CTL_NONE'
value: raw("UART_FLOW_CTL_NONE")
CONSOLE_UART_DEV:
description: 'Console UART device.'
value: '"uart0"'