0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

stm32f4-discoveryの作法 その9

Posted at

概要

stm32f4-discoveryの作法、調べてみた。
豊四季タイニーBASIC Arduino版、移植してみた。

写真

image

移植

putchとgetchを書いた。

uint8_t rx_buffer[20];
void putch(char c)
{
	char * p = "a";
	p = &c;
	uart_2_send(p, 1);
}
char getch()
{
	if (uart_2_is_interupt()) 
	{
		uart_2_clear_interupt();
		int length = uart_2_get(rx_buffer);
		return rx_buffer[0];
	}
	return;
}

サンプルコード

10 FOR I=1 TO 100
20 F=I/3*3=I
30 B=I/5*5=I
40 IF F PRINT "fizz",
50 IF B PRINT "buzz",
60 IF F+B=0 PRINT I,
70 PRINT
80 NEXT I

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?