mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 18:08:30 -04:00
AP_HAL_F4Light: removed some commented-out code
This commit is contained in:
parent
b371d24959
commit
a96378e7e4
@ -139,36 +139,6 @@ void dma_detach_interrupt(dma_stream stream) {
|
||||
dev->regs->STREAM[stream].CR &= ~ (DMA_CR_TCIE | DMA_CR_HTIE | DMA_CR_TEIE | DMA_CR_DMEIE ); //0x1e;
|
||||
}
|
||||
|
||||
#if 0
|
||||
inline void dma_setup_transfer(dma_stream stream,
|
||||
__IO void *peripheral_address,
|
||||
__IO void *memory_address0,
|
||||
uint32_t flags,
|
||||
uint32_t fifo_flags) {
|
||||
const dma_dev * dev=DMAS[(stream>>4) & 3];
|
||||
stream &= 0xF;
|
||||
dev->regs->STREAM[stream].CR &= ~DMA_CR_EN; // disable
|
||||
dev->regs->STREAM[stream].PAR = (uint32_t)peripheral_address;
|
||||
dev->regs->STREAM[stream].M0AR = (uint32_t)memory_address0;
|
||||
dev->regs->STREAM[stream].FCR = fifo_flags & 0x87; // mask out reserved bits
|
||||
dev->regs->STREAM[stream].CR = flags & 0x0feffffe; // mask out reserved and enable
|
||||
}
|
||||
|
||||
// memory-memory
|
||||
inline void dma_setup_transfer_mm(dma_stream stream,
|
||||
__IO void *memory_address0,
|
||||
__IO void *memory_address1,
|
||||
uint32_t flags,
|
||||
uint32_t fifo_flags) {
|
||||
const dma_dev * dev=DMAS[(stream>>4) & 3];
|
||||
stream &= 0xF;
|
||||
dev->regs->STREAM[stream].CR &= ~DMA_CR_EN; // disable
|
||||
dev->regs->STREAM[stream].M0AR = (uint32_t)memory_address0;
|
||||
dev->regs->STREAM[stream].M1AR = (uint32_t)memory_address1;
|
||||
dev->regs->STREAM[stream].FCR = fifo_flags & 0x87; // mask out reserved bits
|
||||
dev->regs->STREAM[stream].CR = flags & 0x0feffffe; // mask out reserved and enable
|
||||
}
|
||||
#endif
|
||||
|
||||
// ST similar way
|
||||
void dma_init_transfer(dma_stream stream, DMA_InitType *v){
|
||||
|
@ -25,7 +25,6 @@ static const usart_dev usart1 = {
|
||||
.txrb = &usart1_txrb,
|
||||
.rxrb = &usart1_rxrb,
|
||||
.state = &u1state,
|
||||
// .max_baud = 4500000UL,
|
||||
.irq = USART1_IRQn,
|
||||
.rx_pin = BOARD_USART1_RX_PIN,
|
||||
.tx_pin = BOARD_USART1_TX_PIN,
|
||||
@ -46,7 +45,6 @@ static const usart_dev usart2 = {
|
||||
.txrb = &usart2_txrb,
|
||||
.rxrb = &usart2_rxrb,
|
||||
.state = &u2state,
|
||||
// .max_baud = 2250000UL,
|
||||
.irq = USART2_IRQn,
|
||||
.rx_pin = BOARD_USART2_RX_PIN,
|
||||
.tx_pin = BOARD_USART2_TX_PIN,
|
||||
@ -68,7 +66,6 @@ static const usart_dev usart3 = {
|
||||
.txrb = &usart3_txrb,
|
||||
.rxrb = &usart3_rxrb,
|
||||
.state = &u3state,
|
||||
// .max_baud = 2250000UL,
|
||||
.irq = USART3_IRQn,
|
||||
.rx_pin = BOARD_USART3_RX_PIN,
|
||||
.tx_pin = BOARD_USART3_TX_PIN,
|
||||
@ -88,7 +85,6 @@ static const usart_dev uart4 = {
|
||||
.txrb = &uart4_txrb,
|
||||
.rxrb = &uart4_rxrb,
|
||||
.state = &u4state,
|
||||
//.max_baud = 2250000UL,
|
||||
.irq = UART4_IRQn,
|
||||
.rx_pin = BOARD_USART4_RX_PIN,
|
||||
.tx_pin = BOARD_USART4_TX_PIN,
|
||||
@ -109,7 +105,6 @@ static const usart_dev uart5 = {
|
||||
.txrb = NULL, // RX-only
|
||||
.rxrb = &uart5_rxrb,
|
||||
.state = &u5state,
|
||||
//.max_baud = 2250000UL,
|
||||
.irq = UART5_IRQn,
|
||||
.rx_pin = BOARD_USART5_RX_PIN,
|
||||
.tx_pin = BOARD_USART5_TX_PIN,
|
||||
@ -129,7 +124,6 @@ static const usart_dev usart6 = {
|
||||
.txrb = &usart6_txrb,
|
||||
.rxrb = &usart6_rxrb,
|
||||
.state = &u6state,
|
||||
//.max_baud = 2250000UL,
|
||||
.irq = USART6_IRQn,
|
||||
.rx_pin = BOARD_USART6_RX_PIN,
|
||||
.tx_pin = BOARD_USART6_TX_PIN,
|
||||
|
Loading…
Reference in New Issue
Block a user