Skip to content

Commit 3238d83

Browse files
committed
Piunora + full build + high speed usb
1 parent 5f32d1f commit 3238d83

File tree

3 files changed

+51
-61
lines changed

3 files changed

+51
-61
lines changed

ports/broadcom/boards/diodes_delight_piunora/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
USB_VID = 0x1209
2-
USB_PID = 0x000D
2+
USB_PID = 0xD10D
33
USB_PRODUCT = "Piunora"
44
USB_MANUFACTURER = "Diodes Delight"
55

ports/broadcom/mpconfigport.mk

Lines changed: 14 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,26 @@
11
# All broadcom ports have longints.
22
LONGINT_IMPL = MPZ
33

4-
# Typically the first module to create
5-
CIRCUITPY_MICROCONTROLLER = 1
6-
# Typically the second module to create
7-
CIRCUITPY_DIGITALIO = 1
8-
# Other modules:
4+
CIRCUITPY_FULL_BUILD = 1
5+
6+
# Modules in FULL_BUILD that we don't support.
97
CIRCUITPY_ANALOGIO = 0
10-
CIRCUITPY_BUSIO = 1
11-
CIRCUITPY_ONEWIREIO = 0
12-
CIRCUITPY_PWMIO = 0
13-
CIRCUITPY_COUNTIO = 0
14-
CIRCUITPY_NEOPIXEL_WRITE = 1
15-
CIRCUITPY_PULSEIO = 0
16-
CIRCUITPY_OS = 1
17-
CIRCUITPY_NVM = 0
188
CIRCUITPY_AUDIOBUSIO = 0
199
CIRCUITPY_AUDIOIO = 0
20-
CIRCUITPY_ROTARYIO = 0
21-
CIRCUITPY_RTC = 0
22-
CIRCUITPY_SDCARDIO = 0
23-
CIRCUITPY_SDIOIO = 1
24-
CIRCUITPY_FRAMEBUFFERIO = 1
10+
CIRCUITPY_COUNTIO = 0
2511
CIRCUITPY_FREQUENCYIO = 0
2612
CIRCUITPY_I2CPERIPHERAL = 0
27-
# Requires SPI, PulseIO (stub ok):
28-
CIRCUITPY_DISPLAYIO = 1
29-
30-
# These modules are implemented in shared-module/ - they can be included in
31-
# any port once their prerequisites in common-hal are complete.
32-
# Requires DigitalIO:
33-
CIRCUITPY_BITBANGIO = 1
34-
# Requires DigitalIO
35-
CIRCUITPY_GAMEPAD = 0
36-
# Requires neopixel_write or SPI (dotstar)
37-
CIRCUITPY_PIXELBUF = 1
38-
# Requires OS
39-
CIRCUITPY_RANDOM = 1
40-
# Requires OS, filesystem
41-
CIRCUITPY_STORAGE = 1
42-
# Requires Microcontroller
43-
CIRCUITPY_TOUCHIO = 0
44-
# Requires USB
45-
CIRCUITPY_USB = 1
46-
CIRCUITPY_USB_MSC = 1
47-
CIRCUITPY_USB_HID = 1
48-
CIRCUITPY_USB_MIDI = 1
49-
USB_NUM_ENDPOINT_PAIRS = 8
50-
# Does nothing without I2C
51-
CIRCUITPY_REQUIRE_I2C_PULLUPS = 0
52-
# No requirements, but takes extra flash
53-
CIRCUITPY_ULAB = 0
13+
CIRCUITPY_NVM = 0
14+
CIRCUITPY_PARALLELDISPLAY = 0
15+
CIRCUITPY_PULSEIO = 0
16+
CIRCUITPY_PWMIO = 0
17+
CIRCUITPY_ROTARYIO = 0
18+
CIRCUITPY_RTC = 0
5419

20+
CIRCUITPY_SDIOIO = 1
5521
CIRCUITPY_VIDEOCORE = 1
5622

57-
CIRCUITPY_ERRNO = 0
58-
59-
CIRCUITPY_FULL_BUILD = 0
60-
6123
INTERNAL_FLASH_FILESYSTEM = 1
24+
25+
USB_NUM_ENDPOINT_PAIRS = 8
26+
USB_HIGHSPEED = 1

ports/broadcom/mphalport.h

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,51 @@
1+
/*
2+
* This file is part of the MicroPython project, http://micropython.org/
3+
*
4+
* The MIT License (MIT)
5+
*
6+
* Copyright (c) 2022 Scott Shawcroft
7+
*
8+
* Permission is hereby granted, free of charge, to any person obtaining a copy
9+
* of this software and associated documentation files (the "Software"), to deal
10+
* in the Software without restriction, including without limitation the rights
11+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
* copies of the Software, and to permit persons to whom the Software is
13+
* furnished to do so, subject to the following conditions:
14+
*
15+
* The above copyright notice and this permission notice shall be included in
16+
* all copies or substantial portions of the Software.
17+
*
18+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24+
* THE SOFTWARE.
25+
*/
26+
27+
#ifndef MICROPY_INCLUDED_BROADCOM_MPHALPORT_H
28+
#define MICROPY_INCLUDED_BROADCOM_MPHALPORT_H
29+
130
#include <stdint.h>
231
#include "py/obj.h"
332

33+
34+
#include "supervisor/shared/tick.h"
35+
436
void mp_hal_delay_ms(mp_uint_t ms);
537
void mp_hal_delay_us(mp_uint_t us);
6-
mp_uint_t mp_hal_ticks_cpu(void);
7-
mp_uint_t mp_hal_ticks_us(void);
8-
mp_uint_t mp_hal_ticks_ms(void);
38+
39+
#define mp_hal_ticks_ms() ((mp_uint_t)supervisor_ticks_ms32())
940

1041
void mp_hal_set_interrupt_char(int c);
1142
int mp_hal_stdin_rx_chr(void);
1243
void mp_hal_stdout_tx_strn(const char *str, size_t len);
1344

14-
typedef enum std_io_t {
15-
MINI_UART = 0,
16-
UART,
17-
UART_QEMU
18-
} std_io_t;
19-
20-
void uart_init(std_io_t interface);
21-
2245
#ifdef MICROPY_HW_USBHOST
2346
#include "usbkbd.h"
2447

2548
void usbkbd_setup();
2649
#endif
50+
51+
#endif // MICROPY_INCLUDED_BROADCOM_MPHALPORT_H

0 commit comments

Comments
 (0)