Skip to content

Commit be69e9b

Browse files
committed
Merge branch 'Black_F4_variant' of https://github.com/stevstrong/Arduino_STM32 into Black_F4_variant
# Conflicts: # STM32F4/libraries/SPI/src/SPI.cpp # STM32F4/libraries/SPI/src/SPI.h
2 parents bd3fb68 + 59b71f1 commit be69e9b

3 files changed

Lines changed: 3 additions & 25 deletions

File tree

STM32F4/libraries/SPI/src/SPI.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,6 @@ void SPIClass::write(uint16 data)
357357
* This almost doubles the speed of this function.
358358
*/
359359
spi_tx_reg(_currentSetting->spi_d, data); // write the data to be transmitted into the SPI_DR register (this clears the TXE flag)
360-
//return;
361360
while (spi_is_tx_empty(_currentSetting->spi_d) == 0); // "5. Wait until TXE=1 ..."
362361
while (spi_is_busy(_currentSetting->spi_d) != 0); // "... and then wait until BSY=0 before disabling the SPI."
363362
}

STM32F4/libraries/SPI/src/SPI.h

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
#include <libmaple/dma.h>
4343
#include <wirish.h>
4444

45-
#define SPI_DMA
4645

4746
// SPI_HAS_TRANSACTION means SPI has
4847
// - beginTransaction()
@@ -368,28 +367,12 @@ class SPIClass {
368367
uint8 recv(void);
369368

370369
private:
371-
/*
372-
static inline void DMA1_CH3_Event() {
373-
dma1_ch3_Active = 0;
374-
// dma_disable(DMA1, DMA_CH3);
375-
// dma_disable(DMA1, DMA_CH2);
376-
377-
// To Do. Need to wait for
378-
}
379-
*/
380370
SPISettings _settings[BOARD_NR_SPI];
381371
SPISettings *_currentSetting;
382372

383373
void updateSettings(void);
384-
/*
385-
spi_dev *spi_d;
386-
uint8_t _SSPin;
387-
uint32_t clockDivider;
388-
uint8_t dataMode;
389-
BitOrder bitOrder;
390-
*/
391374
};
392375

393-
extern SPIClass SPI;
376+
extern SPIClass SPI; // needed bx SdFat(EX) lib
394377

395378
#endif

STM32F4/variants/generic_f407v/pin_map.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,16 @@ extern timer_dev timer5;
5353
extern timer_dev timer6;
5454
extern timer_dev timer7;
5555
extern timer_dev timer8;
56+
5657
/*
5758
typedef struct stm32_pin_info {
5859
gpio_dev *gpio_device; // Maple pin's GPIO device
59-
uint8 gpio_bit; // Pin's GPIO port bit.
6060
timer_dev *timer_device; // Pin's timer device, if any.
6161
uint8 timer_channel; // Timer channel, or 0 if none.
62-
const adc_dev *adc_device; // ADC device, if any.
6362
uint8 adc_channel; // Pin ADC channel, or ADCx if none.
63+
const adc_dev *adc_device; // ADC device, if any.
6464
} stm32_pin_info;
6565
*/
66-
const stm32_pin_info PIN_MAP1[] = { // LQFP100 package pin
67-
{&GPIOA, &timer5, 1, 0, &ADC1}, // D00/PA0 | 23 | USART2_CTS | UART4_TX | ETH_MII_CRS | TIM2_CH1_ETR | TIM5_CH1 | TIM8_ETR | ADC123_IN0/WKUP
68-
};
69-
7066
const stm32_pin_info PIN_MAP[] = { // LQFP100 package pin
7167
{&GPIOA, &timer5, 1, 0, &ADC1}, // D00/PA0 | 23 | USART2_CTS | UART4_TX | ETH_MII_CRS | TIM2_CH1_ETR | TIM5_CH1 | TIM8_ETR | ADC123_IN0/WKUP
7268
{&GPIOA, &timer5, 2, 1, &ADC1}, // D01/PA1 | 24 | USART2_RTS | UART4_RX | ETH_RMII_REF_CLK | ETH_MII_RX_CLK | TIM5_CH2 | TIM2_CH2 | ADC123_IN1

0 commit comments

Comments
 (0)