updating pycubed board defs & including

This commit is contained in:
Max Holliday 2021-10-11 15:34:58 -07:00
parent 37bddecf54
commit 7cbcc2f9ec
10 changed files with 33 additions and 45 deletions

View File

@ -24,25 +24,12 @@
* THE SOFTWARE.
*/
#include <string.h>
#include "supervisor/board.h"
#include "py/mpconfig.h"
#include "shared-bindings/nvm/ByteArray.h"
#include "mpconfigboard.h"
#include "common-hal/microcontroller/Pin.h"
#include "hal/include/hal_gpio.h"
#include "shared-bindings/pwmio/PWMOut.h"
nvm_bytearray_obj_t bootcnt = {
.base = {
.type = &nvm_bytearray_type
},
.len = (uint32_t)8192,
.start_address = (uint8_t *)(0x00080000 - 8192)
};
void board_init(void) {
pwmio_pwmout_obj_t pwm;
common_hal_pwmio_pwmout_construct(&pwm, &pin_PA23, 4096, 2, false);
@ -54,8 +41,7 @@ bool board_requests_safe_mode(void) {
}
void reset_board(void) {
uint8_t value_out = 0;
common_hal_nvm_bytearray_get_bytes(&bootcnt,0,1,&value_out);
++value_out;
common_hal_nvm_bytearray_set_bytes(&bootcnt,0,&value_out,1);
}
void board_deinit(void) {
}

View File

@ -15,6 +15,9 @@
// External flash W25Q80DV
#define EXTERNAL_FLASH_QSPI_DUAL
#define CIRCUITPY_DRIVE_LABEL "PYCUBED"
#define CIRCUITPY_BOOT_COUNTER 1
#define BOARD_HAS_CRYSTAL 1
#define DEFAULT_I2C_BUS_SCL (&pin_PB13)

View File

@ -10,8 +10,6 @@ QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICES = W25Q80DV
LONGINT_IMPL = MPZ
CIRCUITPY_DRIVE_LABEL = "PYCUBED"
CIRCUITPY_ULAB = 1
CIRCUITPY_BINASCII = 1
CIRCUITPY_SDCARDIO = 1

View File

@ -24,25 +24,12 @@
* THE SOFTWARE.
*/
#include <string.h>
#include "supervisor/board.h"
#include "py/mpconfig.h"
#include "shared-bindings/nvm/ByteArray.h"
#include "mpconfigboard.h"
#include "common-hal/microcontroller/Pin.h"
#include "hal/include/hal_gpio.h"
#include "shared-bindings/pwmio/PWMOut.h"
nvm_bytearray_obj_t bootcnt = {
.base = {
.type = &nvm_bytearray_type
},
.len = (uint32_t)8192,
.start_address = (uint8_t *)(0x00080000 - 8192)
};
void board_init(void) {
pwmio_pwmout_obj_t pwm;
common_hal_pwmio_pwmout_construct(&pwm, &pin_PA23, 4096, 2, false);
@ -54,8 +41,7 @@ bool board_requests_safe_mode(void) {
}
void reset_board(void) {
uint8_t value_out = 0;
common_hal_nvm_bytearray_get_bytes(&bootcnt,0,1,&value_out);
++value_out;
common_hal_nvm_bytearray_set_bytes(&bootcnt,0,&value_out,1);
}
void board_deinit(void) {
}

View File

@ -15,6 +15,9 @@
#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE)
#define CIRCUITPY_DRIVE_LABEL "PYCUBED"
#define CIRCUITPY_BOOT_COUNTER 1
#define BOARD_HAS_CRYSTAL 1
#define DEFAULT_I2C_BUS_SCL (&pin_PB13)

View File

@ -10,17 +10,25 @@ QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICES = MR2xH40
LONGINT_IMPL = MPZ
CIRCUITPY_DRIVE_LABEL = "PYCUBED"
CIRCUITPY_ULAB = 1
CIRCUITPY_BINASCII = 1
CIRCUITPY_SDCARDIO = 1
CIRCUITPY_JSON = 1
CIRCUITPY_MSGPACK = 1
CIRCUITPY_ALARM = 1
# Not needed.
# no SAMD51 support... yet ;)
# CIRCUITPY_DUALBANK=1
# Not needed
CIRCUITPY_AUDIOBUSIO = 0
CIRCUITPY_BITMAPTOOLS = 0
CIRCUITPY_DISPLAYIO = 0
CIRCUITPY_FRAMEBUFFERIO = 0
CIRCUITPY_KEYPAD = 0
CIRCUITPY_RGBMATRIX = 0
CIRCUITPY_PS2IO = 0
CIRCUITPY_BLEIO_HCI=0
CIRCUITPY_BLEIO=0
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SD

View File

@ -42,3 +42,6 @@ bool board_requests_safe_mode(void) {
void reset_board(void) {
}
void board_deinit(void) {
}

View File

@ -15,9 +15,9 @@ CIRCUITPY_BINASCII = 1
CIRCUITPY_SDCARDIO = 1
CIRCUITPY_JSON = 1
CIRCUITPY_MSGPACK = 1
CIRCUITPY_ALARM = 1
# no SAMD51 support... yet ;)
# CIRCUITPY_ALARM = 1
# CIRCUITPY_DUALBANK=1
# Not needed

View File

@ -42,3 +42,6 @@ bool board_requests_safe_mode(void) {
void reset_board(void) {
}
void board_deinit(void) {
}

View File

@ -11,8 +11,6 @@ EXTERNAL_FLASH_DEVICE_COUNT = 1
EXTERNAL_FLASH_DEVICES = W25Q80DV
LONGINT_IMPL = MPZ
CIRCUITPY_DRIVE_LABEL = "PYCUBED"
CIRCUITPY_ULAB = 1
CIRCUITPY_BINASCII = 1
CIRCUITPY_SDCARDIO = 1