-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathboard_profile.hpp
71 lines (58 loc) · 2.63 KB
/
board_profile.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#pragma once
//=========================================================================//
/*! @file
@brief RX65N/RX651 グループ・ボード・プロファイル @n
基板の基本的な定義 @n
- LED port order @n
- SCI channel, port_map order @n
- CMT channel
@author 平松邦仁 ([email protected])
@copyright Copyright (C) 2024 Kunihito Hiramatsu @n
Released under the MIT license @n
https://github.com/hirakuni45/RX/blob/master/LICENSE
*/
//=========================================================================//
#include "common/device.hpp"
namespace board_profile {
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
/*!
@brief 基板プロファイル空間 @n
Renesas RX65N Envision Kit
*/
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
// 基板シグネチュア
static const char system_str_[] = "RX65N Envision Kit";
/// LED インジケーター
static constexpr bool LED_ACTIVE = 0;
typedef device::PORT<device::PORT7, device::bitpos::B0, LED_ACTIVE> LED;
// SCI ポートの定義
typedef device::SCI9 SCI_CH;
static constexpr auto SCI_ORDER = device::port_map::ORDER::FIRST;
// インターバル・タイマーの定義
typedef device::CMT0 CMT_CH;
// RIIC ポートの定義
typedef device::RIIC0 RIIC_CH;
// CAN ポートの定義
typedef device::CAN0 CAN0_CH;
static constexpr auto CAN0_PORT = device::port_map::ORDER::FIRST;
// QSPI ポートの定義
static constexpr auto QSPI_PORT = device::port_map_order::RX65N_ENVISION_KIT::_;
// MTU ポートの定義
// CN13 (1): PD1_AN109_IRQ1 (MTIOC4B)
typedef device::MTU4 MTU_CH;
static constexpr auto MTU_ORDER = device::port_map_mtu::ORDER::FIFTH;
// SDHI 定義
typedef device::PORT<device::PORT6, device::bitpos::B4, 0> SDC_POWER; ///< '0'でON
typedef device::NULL_PORT SDC_WP; ///< 書き込み禁止は使わない
// RX65N Envision Kit の SDHI ポートは、候補3で指定できる
static constexpr auto SDHI_ORDER = device::port_map::ORDER::THIRD;
// GLCDC, touch panel 定義
typedef device::PORT<device::PORT6, device::bitpos::B3> LCD_DISP;
typedef device::PORT<device::PORT6, device::bitpos::B6> LCD_LIGHT;
static constexpr uint32_t LCD_ORG = 0x0000'0100;
typedef device::PORT<device::PORT0, device::bitpos::B7> FT5206_RESET;
typedef device::SCI6 FT5206_SCI_CH;
static constexpr auto FT5206_SCI_ORDER = device::port_map::ORDER::FIRST;
// Ethernet ハードウェアー定義 (RX65N Envision Kit / LAN8720A: ET0_RMII)
static constexpr device::port_map_order::ether_rmii_t ETHER0(device::port_map_order::RX65N_ENVISION_KIT _);
}