/*
 * Copyright 2021 MindMotion Microelectronics Co., Ltd.
 * All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#ifndef __BOARD_INIT_H__
#define __BOARD_INIT_H__

#include <stdio.h>
#include <stdint.h>

#include "hal_common.h"
#include "hal_rcc.h"
#include "hal_dma.h"

#include "clock_init.h"
#include "pin_init.h"
#include "hal_uart.h"

/* DEBUG UART. */
#define BOARD_DEBUG_UART_PORT        UART1
#define BOARD_DEBUG_UART_BAUDRATE    9600u
#define BOARD_DEBUG_UART_FREQ        CLOCK_APB2_FREQ

/* DMA. */
#define BOARD_DMA_PORT               DMA1
#define BOARD_DMA_CHANNEL            0u
#define BOARD_DMA_CHANNEL_IRQn       DMA1_CH1_IRQn
#define BOARD_DMA_CHANNEL_IRQHandler DMA1_CH1_IRQHandler

void BOARD_Init(void);

#endif /* __BOARD_INIT_H__ */
