Skip to content

Add support for target MTB_ADV_WISE_1530. #6423

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

Closed
wants to merge 1 commit into from
Closed
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
442 changes: 442 additions & 0 deletions features/FEATURE_BLE/targets/TARGET_MTB_ADV_WISE_1530/HCIDriver.cpp

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/* mbed Microcontroller Library
* Copyright (c) 2016 ARM Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef MBED_PERIPHERALNAMES_H
#define MBED_PERIPHERALNAMES_H

#include "cmsis.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef enum {
ADC_1 = (int)ADC1_BASE
} ADCName;

typedef enum {
UART_1 = (int)USART1_BASE,
UART_2 = (int)USART2_BASE,
UART_3 = (int)USART3_BASE,
UART_6 = (int)USART6_BASE
} UARTName;

typedef enum {
SPI_1 = (int)SPI1_BASE,
SPI_2 = (int)SPI2_BASE,
SPI_3 = (int)SPI3_BASE,
SPI_4 = (int)SPI4_BASE,
SPI_5 = (int)SPI5_BASE
} SPIName;

typedef enum {
I2C_1 = (int)I2C1_BASE,
I2C_2 = (int)I2C2_BASE,
I2C_3 = (int)I2C3_BASE,
FMPI2C_1 = (int)FMPI2C1_BASE
} I2CName;

typedef enum {
PWM_1 = (int)TIM1_BASE,
PWM_2 = (int)TIM2_BASE,
PWM_3 = (int)TIM3_BASE,
PWM_4 = (int)TIM4_BASE,
PWM_5 = (int)TIM5_BASE,
PWM_8 = (int)TIM8_BASE,
PWM_9 = (int)TIM9_BASE,
PWM_10 = (int)TIM10_BASE,
PWM_11 = (int)TIM11_BASE,
PWM_12 = (int)TIM12_BASE,
PWM_13 = (int)TIM13_BASE,
PWM_14 = (int)TIM14_BASE
} PWMName;

typedef enum {
CAN_1 = (int)CAN1_BASE,
CAN_2 = (int)CAN2_BASE
} CANName;

#ifdef __cplusplus
}
#endif

#endif

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,267 @@
/* mbed Microcontroller Library
* Copyright (c) 2016 ARM Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

#include "cmsis.h"
#include "PinNamesTypes.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef enum {
PA_0 = 0x00,
PA_1 = 0x01,
PA_2 = 0x02,
PA_3 = 0x03,
PA_4 = 0x04,
PA_5 = 0x05,
PA_6 = 0x06,
PA_7 = 0x07,
PA_8 = 0x08,
PA_9 = 0x09,
PA_10 = 0x0A,
PA_11 = 0x0B,
PA_12 = 0x0C,
PA_13 = 0x0D,
PA_14 = 0x0E,
PA_15 = 0x0F,

PB_0 = 0x10,
PB_1 = 0x11,
PB_2 = 0x12,
PB_3 = 0x13,
PB_4 = 0x14,
PB_5 = 0x15,
PB_6 = 0x16,
PB_7 = 0x17,
PB_8 = 0x18,
PB_9 = 0x19,
PB_10 = 0x1A,
PB_11 = 0x1B,
PB_12 = 0x1C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 0x6F,

PH_0 = 0x70,
PH_1 = 0x71,

// Not connected
NC = (int)0xFFFFFFFF,

//Module pins.
P_1 = PA_0,
P_2 = PA_1,
P_3 = PA_2,
P_4 = PA_3,
P_5 = PA_4,
P_6 = PA_5,
P_7 = PA_6,
P_8 = PA_7,
P_9 = PA_9,
P_10 = PA_10,
P_11 = PA_11,
P_12 = PA_12,
P_13 = PA_13,
P_14 = PA_14,
P_15 = PA_15,
P_16 = PB_0,
P_17 = PB_1,
P_18 = PB_2,
P_19 = PB_3,
P_20 = PB_4,
P_21 = PB_5,
P_22 = PB_6,
P_23 = PB_7,
P_24 = PB_8,
P_25 = PB_9,
P_26 = PB_10,
P_27 = PB_11,
P_28 = PB_12,
P_29 = PB_13,
P_30 = PB_14,
P_31 = PB_15,
P_32 = PC_0,
P_33 = PC_1,
P_34 = PC_2,
P_35 = PC_3,
P_36 = PC_4,
P_37 = PC_5,
P_38 = PC_6,
P_39 = PC_7,
P_40 = PC_8,
P_41 = PC_9,
P_42 = PC_10,
P_43 = PC_11,
P_44 = PC_12,
P_45 = PC_13,
P_46 = PC_14,
P_47 = PC_15,
P_48 = PD_2,


// ADC internal channels
ADC_TEMP = 0xF0,
ADC_VREF = 0xF1,
ADC_VBAT = 0xF2,

// Generic signals namings
GPIO0 = PA_5,
GPIO1 = PB_0,
GPIO2 = PB_1,
GPIO7 = PB_14,

I2S_CK = PB_12,
I2S_SW = PA_4,
I2S_MCK = PB_10,
I2S_SD = PC_12,

SERIAL_TX = PA_9,
SERIAL_RX = PA_10,

UART2_TX = PB_10,
UART2_RX = PC_11,
#ifdef MBED_CONF_TARGET_STDIO_UART_TX
STDIO_UART_TX = MBED_CONF_TARGET_STDIO_UART_TX,
#else
STDIO_UART_TX = SERIAL_TX,
#endif

#ifdef MBED_CONF_TARGET_STDIO_UART_RX
STDIO_UART_RX = MBED_CONF_TARGET_STDIO_UART_RX,
#else
STDIO_UART_RX = SERIAL_RX,
#endif

USBRX = STDIO_UART_RX,
USBTX = STDIO_UART_TX,

I2C0_SCL = PB_6,
I2C0_SDA = PB_7,
I2C0_RST = PC_13,

SPI0_MOSI = PC_3,
SPI0_MISO = PC_2,
SPI0_SCK = PB_13,
SPI0_CS = PB_9,

ADCONV0 = PA_6,
ADCONV1 = PA_7,
ADCONV2 = PC_4,
ADCONV3 = PC_5,

EXTI1 = PC_0,

USB_HS_DP = PA_12,
USB_HS_DN = PA_11,
LED_RED = GPIO0,
LED1 = LED_RED,
LED2 = LED_RED,
BUTTON1 = GPIO2,
} PinName;

#ifdef __cplusplus
}
#endif

#endif
Loading