32 #include "../tkdnhal/tkdn_hal.h"
34 #include "..\tkdnhal\tkdn_hal.h"
43 typedef unsigned char byte;
44 typedef unsigned short word;
55 #define F_CPU 96000000UL
62 #define INPUT_PULLUP 2
77 #define IO_DDR0 (*(volatile unsigned char *)0x0008C000)
78 #define IO_DDR1 (*(volatile unsigned char *)0x0008C001)
79 #define IO_DDR2 (*(volatile unsigned char *)0x0008C002)
80 #define IO_DDR3 (*(volatile unsigned char *)0x0008C003)
81 #define IO_DDR4 (*(volatile unsigned char *)0x0008C004)
82 #define IO_DDR5 (*(volatile unsigned char *)0x0008C005)
83 #define IO_DDR6 (*(volatile unsigned char *)0x0008C006)
84 #define IO_DDR7 (*(volatile unsigned char *)0x0008C007)
85 #define IO_DDR8 (*(volatile unsigned char *)0x0008C008)
86 #define IO_DDR9 (*(volatile unsigned char *)0x0008C009)
87 #define IO_DDRA (*(volatile unsigned char *)0x0008C00a)
88 #define IO_DDRB (*(volatile unsigned char *)0x0008C00b)
89 #define IO_DDRC (*(volatile unsigned char *)0x0008C00c)
90 #define IO_DDRD (*(volatile unsigned char *)0x0008C00d)
91 #define IO_DDRE (*(volatile unsigned char *)0x0008C00e)
92 #define IO_DDRF (*(volatile unsigned char *)0x0008C00f)
94 #define IO_PORT0 (*(volatile unsigned char *)0x0008C020)
95 #define IO_PORT1 (*(volatile unsigned char *)0x0008C021)
96 #define IO_PORT2 (*(volatile unsigned char *)0x0008C022)
97 #define IO_PORT3 (*(volatile unsigned char *)0x0008C023)
98 #define IO_PORT4 (*(volatile unsigned char *)0x0008C024)
99 #define IO_PORT5 (*(volatile unsigned char *)0x0008C025)
100 #define IO_PORT6 (*(volatile unsigned char *)0x0008C026)
101 #define IO_PORT7 (*(volatile unsigned char *)0x0008C027)
102 #define IO_PORT8 (*(volatile unsigned char *)0x0008C028)
103 #define IO_PORT9 (*(volatile unsigned char *)0x0008C029)
104 #define IO_PORTA (*(volatile unsigned char *)0x0008C02A)
105 #define IO_PORTB (*(volatile unsigned char *)0x0008C02B)
106 #define IO_PORTC (*(volatile unsigned char *)0x0008C02C)
107 #define IO_PORTD (*(volatile unsigned char *)0x0008C02D)
108 #define IO_PORTE (*(volatile unsigned char *)0x0008C02E)
109 #define IO_PORTF (*(volatile unsigned char *)0x0008C02F)
111 #define IO_PIN0 (*(volatile unsigned char *)0x0008C040)
112 #define IO_PIN1 (*(volatile unsigned char *)0x0008C041)
113 #define IO_PIN2 (*(volatile unsigned char *)0x0008C042)
114 #define IO_PIN3 (*(volatile unsigned char *)0x0008C043)
115 #define IO_PIN4 (*(volatile unsigned char *)0x0008C044)
116 #define IO_PIN5 (*(volatile unsigned char *)0x0008C045)
117 #define IO_PIN6 (*(volatile unsigned char *)0x0008C046)
118 #define IO_PIN7 (*(volatile unsigned char *)0x0008C047)
119 #define IO_PIN8 (*(volatile unsigned char *)0x0008C048)
120 #define IO_PIN9 (*(volatile unsigned char *)0x0008C049)
121 #define IO_PINA (*(volatile unsigned char *)0x0008C04A)
122 #define IO_PINB (*(volatile unsigned char *)0x0008C04B)
123 #define IO_PINC (*(volatile unsigned char *)0x0008C04C)
124 #define IO_PIND (*(volatile unsigned char *)0x0008C04D)
125 #define IO_PINE (*(volatile unsigned char *)0x0008C04E)
126 #define IO_PINF (*(volatile unsigned char *)0x0008C04F)
128 static const int BIN = 2;
129 static const int OCT = 8;
130 static const int DEC = 10;
131 static const int HEX = 16;
132 static const int BYTE = 256;
140 extern void setup(
void);
150 extern void loop(
void);
161 void Reboot(
bool run_userapp);
164 typedef void (*FUNCTYPE_ETHER_HANDLER)(void);
167 void registEthernetHandler(FUNCTYPE_ETHER_HANDLER func);
169 #define RXDUINO_VERSION 0x01200000 // Version 1.20
171 const char RXDUINO_COPYRIGHT[] =
"(C)Copyright 2012-2014 Tokushu Denshi Kairo Inc.";
190 #endif // __H_RXDUINO
long int int32_t
32bitの符号付き数値(-2147483648~2147483647)を表わす
bool boolean
真(true)か偽(false)を表す型
unsigned long long uint64_t
64bitの符号無し数値(0~18446744073709551615)を表わす
short int16_t
16bitの符号付き数値(-32768~32767)を表わす
void setup(void)
ユーザが作る関数。システム起動時に1回だけ呼び出される。
unsigned short word
16bitの符号無し数値(0~65535)を表わす
unsigned short uint16_t
16bitの符号無し数値(0~65535)を表わす
long unsigned int uint32_t
32bitの符号無し数値(0~4294967295)を表わす
unsigned char uint8_t
8bitの符号無し数値(0~255)を表わす
UARTやUSB仮想COMポートを使うためのライブラリ
void Reboot(bool run_userapp)
ソフトリセットを行い、システムをリブートする
unsigned char byte
8bitの符号無し数値(0~255)を表わす
signed char int8_t
8bitの符号付き数値(-128~127)を表わす
void loop(void)
ユーザが作る関数。システム起動後に繰り返し呼び出される。
long long int64_t
64bitの符号付き数値(-9223372036854775808~9223372036854775807)を表わす