summaryrefslogtreecommitdiff
path: root/robot/setup.c
blob: d040286bf6bb1c0e1aec33851277fb29675fdd9a (plain)
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
#include <stdlib.h>

#include "bin.h"
#include "consts.h"
#include "halt.h"
#include "modes.h"
#include "orangutan_shim.h"
#include "setup.h"

// pointers for endianness check
static const uint16_t _test	 = 1;
static const uint8_t *_ptest = (uint8_t *)&_test;
uint8_t g_w2_endianness;

void w2_setup_main() {
	// check endianness
	g_w2_endianness = *_ptest;

	serial_set_baud_rate(W2_SERIAL_BAUD);

	// reset underside leds
	red_led(0);
	green_led(0);

	// clear lcd
	clear();

	// indicate startup done
	play("L50 c>c");
}