add rpihat 212
This commit is contained in:
Родитель
95ee1d23a6
Коммит
5a1b185388
5
Makefile
5
Makefile
|
@ -10,12 +10,13 @@ _IGNORE1 := $(shell test -f $(JD_STM)/stm32/cmsis_device_g0/README.md || git sub
|
|||
include Makefile.user
|
||||
|
||||
DROP_TARGETS ?= \
|
||||
star-brain \
|
||||
jm-v4.0 \
|
||||
jm-v4.3br \
|
||||
jm-v3.3 \
|
||||
jm-v3.6 \
|
||||
jm-v3.6one \
|
||||
jm-v3.8 \
|
||||
jm-v4.0 \
|
||||
star-brain \
|
||||
jm-v4.0rot \
|
||||
jm-v4.0matrix \
|
||||
jm-accelerometer-30-1.0 \
|
||||
|
|
2
jacdac-c
2
jacdac-c
|
@ -1 +1 @@
|
|||
Subproject commit 5c7706230d0b1ae272647ca69cb9ad39b0df19d1
|
||||
Subproject commit 9e5e261c2ca9c1f459fcc42f740c73f25a79f378
|
|
@ -1 +1 @@
|
|||
Subproject commit 266b626fe8ac32eeed9d7bb9970fc1f60de217bf
|
||||
Subproject commit e33476158efd292110f365c41bd52e3e4f141783
|
|
@ -29,6 +29,5 @@
|
|||
|
||||
#define DEVICE_DMESG_BUFFER_SIZE 0
|
||||
#define JD_CONFIG_CONTROL_FLOOD 0
|
||||
#undef JD_CONFIG_TEMPERATURE
|
||||
#define JD_CONFIG_TEMPERATURE 0
|
||||
|
||||
|
|
|
@ -0,0 +1,79 @@
|
|||
#define PIN_LED -1
|
||||
#define PIN_LED_GND -1
|
||||
|
||||
#define PIN_PWR -1
|
||||
#define PIN_P0 -1
|
||||
#define PIN_P1 -1
|
||||
|
||||
#define MIKROBUS_AVAILABLE 1
|
||||
|
||||
// Left header
|
||||
#define PIN_AN PA_5
|
||||
#define PIN_RST PA_0
|
||||
#define PIN_RX_CS PA_3
|
||||
#define PIN_SCK PA_1 // SPI1
|
||||
#define PIN_MISO PA_6
|
||||
#define PIN_TX_MOSI PA_2
|
||||
|
||||
#define PIN_CS PIN_RX_CS
|
||||
// VCC
|
||||
// GND
|
||||
|
||||
#define PIN_ASCK PIN_SCK
|
||||
#define PIN_AMOSI PIN_TX_MOSI
|
||||
#define PIN_AMISO PIN_MISO
|
||||
|
||||
// Right header
|
||||
#define PIN_PWM PA_4 // TIM14
|
||||
#define PIN_INT PC_15
|
||||
// RX/CS USART2
|
||||
// TX/MOSI
|
||||
#define PIN_SCL PA_9 // I2C2
|
||||
#define PIN_SDA PA_10 // I2C2
|
||||
// 5V
|
||||
// GND
|
||||
|
||||
#define PIN_X1 PIN_MISO
|
||||
#define PIN_X0 PIN_PWM
|
||||
|
||||
#define BOARD_STARTUP_CODE LL_SYSCFG_EnablePinRemap(LL_SYSCFG_PIN_RMP_PA11 | LL_SYSCFG_PIN_RMP_PA12)
|
||||
|
||||
#define I2C_AF LL_GPIO_AF_6
|
||||
#define I2C_IDX 1
|
||||
|
||||
#define UART_PIN PB_6
|
||||
#define UART_PIN_AF LL_GPIO_AF_0
|
||||
#define USART_IDX 1
|
||||
|
||||
// here, the anode (source) is common
|
||||
// #define LED_RGB_COMMON_CATHODE 1
|
||||
#define PIN_LED_R PB_0
|
||||
#define PIN_LED_G PA_7
|
||||
#define PIN_LED_B PB_8
|
||||
|
||||
// calibrated to ~50lux per channel
|
||||
#define LED_R_MULT 250
|
||||
#define LED_G_MULT 76
|
||||
#define LED_B_MULT 221
|
||||
#define RGB_LED_PERIOD 600
|
||||
|
||||
#define PIN_BL_LED PIN_LED_B
|
||||
#define PIN_BL_PERIOD 300
|
||||
|
||||
#define PIN_ACC_INT PIN_INT
|
||||
|
||||
#define PIN_BR_TX_READY PA_0
|
||||
#define PIN_BR_RX_READY PA_5
|
||||
|
||||
#define LED_STRIP_LOCK_TYPE 1
|
||||
#define LED_STRIP_LOCK_NUM_PIXELS 1
|
||||
|
||||
#define JD_BRIDGE 1
|
||||
|
||||
struct _jd_frame_t;
|
||||
void bridge_forward_frame(struct _jd_frame_t *frame);
|
||||
#define JD_BRIDGE_SEND(fr) bridge_forward_frame(fr)
|
||||
|
||||
#define SPI_RX 1
|
||||
#define USE_SPIS 1
|
||||
#define JD_RAW_FRAME 1
|
|
@ -0,0 +1,2 @@
|
|||
MCU = STM32G030x6
|
||||
include $(PLATFORM)/mk/stm32g0.mk
|
|
@ -0,0 +1,17 @@
|
|||
#include "jdprofile.h"
|
||||
|
||||
FIRMWARE_IDENTIFIER(0x308c7c98, "JM-RPiHat SPI bridge 212 v4.3");
|
||||
|
||||
void bridge_init(void);
|
||||
|
||||
static const power_config_t pcfg = {
|
||||
.pin_fault = PA_4,
|
||||
.pin_en = PC_15,
|
||||
.pin_pulse = NO_PIN,
|
||||
.en_active_high = 1,
|
||||
};
|
||||
|
||||
void app_init_services() {
|
||||
bridge_init();
|
||||
power_init(&pcfg);
|
||||
}
|
Загрузка…
Ссылка в новой задаче