Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Clean variants files#167

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fpistm merged 1 commit intostm32duino:masterfromfpistm:variant_cleanup
Dec 6, 2017
Merged
Show file tree
Hide file tree
Changes fromall 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
48 changes: 48 additions & 0 deletionscores/arduino/pins_arduino_var.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -100,6 +100,54 @@ uint32_t pinNametoDigitalPin(PinName p);
(digitalPinFirstOccurence(p) == PIN_SERIAL_TX))
#endif

// Default Definitions, could be redefined in variant.h
#ifndef ADC_RESOLUTION
#define ADC_RESOLUTION 12
#endif
#ifndef DACC_RESOLUTION
#define DACC_RESOLUTION 12
#endif
#ifndef PWM_RESOLUTION
#define PWM_RESOLUTION 8
#endif
#ifndef PWM_FREQUENCY
#define PWM_FREQUENCY 1000
#endif
#ifndef PWM_MAX_DUTY_CYCLE
#define PWM_MAX_DUTY_CYCLE 255
#endif

// Default for Arduino connector compatibility
// SPI Definitions
#ifndef SS
#define SS 10
#endif
#ifndef SS1
#define SS1 4
#endif
#ifndef SS2
#define SS2 7
#endif
#ifndef SS3
#define SS3 8
#endif
#ifndef MOSI
#define MOSI 11
#endif
#ifndef MISO
#define MISO 12
#endif
#ifndef SCK
#define SCK 13
#endif
// I2C Definitions
#ifndef SDA
#define SDA 14
#endif
#ifndef SCL
#define SCL 15
#endif

#ifdef __cplusplus
}
#endif
Expand Down
50 changes: 20 additions & 30 deletionsvariants/DISCO_F100RB/variant.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -112,42 +112,32 @@ enum {
AEND
};

//ADC resolution is 12bits
#define ADC_RESOLUTION 12
#define DACC_RESOLUTION 12

//PWR resolution
#define PWM_RESOLUTION 8
#define PWM_FREQUENCY 1000
#define PWM_MAX_DUTY_CYCLE 255

//On-board LED pin number
#define LED_BUILTIN 21
// On-board LED pin number
#define LED_BUILTIN PC9
#define LED_GREEN LED_BUILTIN
#define LED_BLUE20
#define LED_BLUEPC8

//On-board user button
//On-board user button
#define USER_BTN 5

//SPIdefinitions
#define SS43
#define SS140
#define SS241
#define SS342
#define MOSI46
#define MISO45
#define SCK44

//I2C Definitions
#define SDA38
#define SCL37

//Timer Definitions
//Do not use timer used by PWM pins when possible. See PinMap_PWM.
//SPIDefinitions
#define SSPB12
#define SS1PB9
#define SS2PB10
#define SS3PB11
#define MOSIPB15
#define MISOPB14
#define SCKPB13

//I2C Definitions
#define SDAPB7
#define SCLPB6

//Timer Definitions
//Do not use timer used by PWM pins when possible. See PinMap_PWM.
#define TIMER_TONE TIM15
#define TIMER_UART_EMULATED TIM16

//Do not use basic timer: OC is required
//Do not use basic timer: OC is required
#define TIMER_SERVO TIM17 //TODO: advanced-control timers don't work

// UART Definitions
Expand Down
44 changes: 14 additions & 30 deletionsvariants/DISCO_F407VG/variant.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -137,49 +137,33 @@ enum {
AEND
};

//ADC resolution is 12bits
#define ADC_RESOLUTION 12
#define DACC_RESOLUTION 12

//PWR resolution
#define PWM_RESOLUTION 8
#define PWM_FREQUENCY 1000
#define PWM_MAX_DUTY_CYCLE 255

//On-board LED pin number
#define LED_BUILTIN 18
// On-board LED pin number
#define LED_BUILTIN PD12
#define LED_GREEN LED_BUILTIN
#define LED_BLUE58
#define LED_RED19
#define LED_ORANGE57
#define LED_BLUEPD15
#define LED_REDPD14
#define LED_ORANGEPD13

//On-board user button
//On-board user button
#define USER_BTN 2


//SPI definitions
#define SS 10
#define SS1 4
// SPI Definitions
#define SS2 14
#define MOSI44
#define MOSIPA7
#define MISO 5
#define SCK43
#define SCKPA5

//I2C Definitions
#define SDA66
#define SCL26
//I2C Definitions
#define SDAPB7
#define SCLPB8

//Timer Definitions
//Do not use timer used by PWM pin. See PinMap_PWM.
//Timer Definitions
//Do not use timer used by PWM pin. See PinMap_PWM.
#define TIMER_TONE TIM6
#define TIMER_SERVO TIM7
#define TIMER_UART_EMULATED TIM6

// UART Definitions
#define SERIAL_UART_INSTANCE 2 //Connected to ST-Link
// UART Emulation
#define UART_EMUL_RX PE_9
#define UART_EMUL_TX PE_11

// Default pin used for 'Serial' instance (ex: ST-Link)
// Mandatory for Firmata
Expand Down
36 changes: 6 additions & 30 deletionsvariants/DISCO_F746NG/variant.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -69,42 +69,18 @@ enum {
AEND
};

//ADC resolution is 12bits
#define ADC_RESOLUTION 12
#define DACC_RESOLUTION 12

//PWR resolution
#define PWM_RESOLUTION 8
#define PWM_FREQUENCY 1000
#define PWM_MAX_DUTY_CYCLE 255

//On-board LED pin number
// On-board LED pin number
#define LED_BUILTIN 13
#define LED_GREEN LED_BUILTIN

//On-board user button
#define USER_BTN 22


//SPI definitions
#define SS 10
#define SS1 4
#define SS2 7
#define SS3 8
#define MOSI 11
#define MISO 12
#define SCK 13

//I2C Definitions
#define SDA 14
#define SCL 15
// On-board user button
#define USER_BTN PI11

//Timer Definitions
//Do not use timer used by PWM pins when possible. See PinMap_PWM.
//Timer Definitions
//Do not use timer used by PWM pins when possible. See PinMap_PWM.
#define TIMER_TONE TIM6
#define TIMER_UART_EMULATED TIM7

//Do not use basic timer: OC is required
//Do not use basic timer: OC is required
#define TIMER_SERVO TIM2 //TODO: advanced-control timers don't work

// UART Definitions
Expand Down
33 changes: 5 additions & 28 deletionsvariants/DISCO_L072CZ_LRWAN1/variant.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -79,16 +79,7 @@ enum {
AEND
};

//ADC resolution is 12bits
#define ADC_RESOLUTION 12
#define DACC_RESOLUTION 12

//PWR resolution
#define PWM_RESOLUTION 8
#define PWM_FREQUENCY 1000
#define PWM_MAX_DUTY_CYCLE 255

//On-board LED pin number
// On-board LED pin number
#define LED_BUILTIN PA5
#define LED_LD2 LED_BUILTIN
#define LED_GREEN2 LED_BUILTIN
Expand All@@ -99,28 +90,14 @@ enum {
#define LED_RED 5
#define LED_LD4 LED_RED

//On-board user button
//On-board user button
#define USER_BTN 6


//SPI definitions
#define SS 10
#define SS1 4
#define SS2 7
#define SS3 8
#define MOSI 11
#define MISO 12
#define SCK 13

//I2C Definitions
#define SDA 14
#define SCL 15

//Timer Definitions
//Do not use timer used by PWM pins when possible. See PinMap_PWM.
// Timer Definitions
// Do not use timer used by PWM pins when possible. See PinMap_PWM.
#define TIMER_TONE TIM22

//Do not use basic timer: OC is required
//Do not use basic timer: OC is required
#define TIMER_SERVO TIM2 //TODO: advanced-control timers don't work

// UART Definitions
Expand Down
34 changes: 5 additions & 29 deletionsvariants/DISCO_L475VG_IOT/variant.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -139,45 +139,21 @@ enum {
AEND
};

//ADC resolution is 12bits
#define ADC_RESOLUTION 12
#define DACC_RESOLUTION 12

//PWR resolution
#define PWM_RESOLUTION 8
#define PWM_FREQUENCY 1000
#define PWM_MAX_DUTY_CYCLE 255

//On-board LED pin number
// On-board LED pin number
#define LED_BUILTIN 13
#define LED1 LED_BUILTIN
#define LED2 PB14
#define LED3 PC9
#define LED4 LED3

//On-board user button
//On-board user button
#define USER_BTN PC13


//SPI definitions
#define SS 10
#define SS1 4
#define SS2 7
#define SS3 8
#define MOSI 11
#define MISO 12
#define SCK 13

//I2C Definitions
#define SDA 14
#define SCL 15

//Timer Definitions
//Do not use timer used by PWM pins when possible. See PinMap_PWM.
// Timer Definitions
// Do not use timer used by PWM pins when possible. See PinMap_PWM.
#define TIMER_TONE TIM6
#define TIMER_UART_EMULATED TIM7

//Do not use basic timer: OC is required
//Do not use basic timer: OC is required
#define TIMER_SERVO TIM2 //TODO: advanced-control timers don't work

// UART Definitions
Expand Down
34 changes: 6 additions & 28 deletionsvariants/NUCLEO_F030R8/variant.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -112,40 +112,18 @@ enum {
AEND
};

//ADC resolution is 12bits
#define ADC_RESOLUTION 12

//PWR resolution
#define PWM_RESOLUTION 8
#define PWM_FREQUENCY 1000
#define PWM_MAX_DUTY_CYCLE 255

//On-board LED pin number
// On-board LED pin number
#define LED_BUILTIN 13
#define LED_GREEN LED_BUILTIN

//On-board user button
#define USER_BTN 24


//SPI definitions
#define SS 10
#define SS1 4
#define SS2 7
#define SS3 8
#define MOSI 11
#define MISO 12
#define SCK 13

//I2C Definitions
#define SDA 14
#define SCL 15
// On-board user button
#define USER_BTN PC13

//Timer Definitions
//Do not use timer used by PWM pins when possible. See PinMap_PWM.
//Timer Definitions
//Do not use timer used by PWM pins when possible. See PinMap_PWM.
#define TIMER_TONE TIM6

//Do not use basic timer: OC is required
//Do not use basic timer: OC is required
#define TIMER_SERVO TIM3 //TODO: advanced-control timers don't work

// UART Definitions
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp