cleanup warnings

This commit is contained in:
Alfio Di Mauro 2020-10-21 09:29:52 +02:00
parent 29b2ee9b2d
commit ca0b935034
2 changed files with 10 additions and 10 deletions

View file

@ -18,7 +18,7 @@
* @Author: Alfio Di Mauro * @Author: Alfio Di Mauro
* @Date: 2020-03-23 09:33:29 * @Date: 2020-03-23 09:33:29
* @Last Modified by: Alfio Di Mauro * @Last Modified by: Alfio Di Mauro
* @Last Modified time: 2020-05-11 13:28:30 * @Last Modified time: 2020-10-21 09:29:07
*/ */
#include "pulp.h" #include "pulp.h"
@ -28,12 +28,12 @@
static void spim_wait_tx_done(int periph) static void spim_wait_tx_done(int periph)
{ {
#ifdef DEBUG //#ifdef DEBUG
int periph_id = periph - ARCHI_SPIM_QSPI_ID(0); //int periph_id = periph - ARCHI_UDMA_SPIM_ID(0);
printf("periph_id = %d\n", periph_id); // printf("periph_id = %d\n", periph_id);
#endif //#endif
while (plp_udma_busy(UDMA_SPIM_TX_ADDR(periph - ARCHI_SPIM_UART_ID(0)))) while (plp_udma_busy(UDMA_SPIM_TX_ADDR(periph - ARCHI_UDMA_UART_ID(0))))
{ {
} }
@ -50,7 +50,7 @@ static void spim_wait_rx_done(int periph)
int qspi_write_nb(int qspi_id, void *buffer, uint32_t size) int qspi_write_nb(int qspi_id, void *buffer, uint32_t size)
{ {
int periph_id = ARCHI_UDMA_QSPI_ID(qspi_id); int periph_id = ARCHI_UDMA_SPIM_ID(qspi_id);
int channel = UDMA_CHANNEL_ID(periph_id) + 1; int channel = UDMA_CHANNEL_ID(periph_id) + 1;
unsigned int base = hal_udma_channel_base(channel); unsigned int base = hal_udma_channel_base(channel);

View file

@ -57,15 +57,15 @@ static inline void plp_spim_reg_write(int channel, unsigned int addr, unsigned i
//} //}
static inline void plp_qspi_disable(int channel) { static inline void plp_qspi_disable(int channel) {
pulp_write32(ARCHI_UDMA_ADDR + UDMA_QSPI_OFFSET(channel) + UDMA_CHANNEL_CUSTOM_OFFSET + UART_SETUP_OFFSET, 0x00500006); pulp_write32(ARCHI_UDMA_ADDR + UDMA_SPIM_OFFSET(channel) + UDMA_CHANNEL_CUSTOM_OFFSET + UART_SETUP_OFFSET, 0x00500006);
} }
static inline int plp_qspi_tx_busy(int channel) { static inline int plp_qspi_tx_busy(int channel) {
return pulp_read32(ARCHI_UDMA_ADDR + UDMA_QSPI_OFFSET(channel) + UDMA_CHANNEL_CUSTOM_OFFSET + UART_STATUS_OFFSET) & 1; return pulp_read32(ARCHI_UDMA_ADDR + UDMA_SPIM_OFFSET(channel) + UDMA_CHANNEL_CUSTOM_OFFSET + UART_STATUS_OFFSET) & 1;
} }
static inline int plp_qspi_rx_busy(int channel) { static inline int plp_qspi_rx_busy(int channel) {
return (pulp_read32(ARCHI_UDMA_ADDR + UDMA_QSPI_OFFSET(channel) + UDMA_CHANNEL_CUSTOM_OFFSET + UART_STATUS_OFFSET) >> 1) & 1; return (pulp_read32(ARCHI_UDMA_ADDR + UDMA_SPIM_OFFSET(channel) + UDMA_CHANNEL_CUSTOM_OFFSET + UART_STATUS_OFFSET) >> 1) & 1;
} }
#endif #endif