summaryrefslogtreecommitdiffstats
path: root/humidity_sensors/app/util.c
blob: 04a17aeeed0f28875416b57020036cd56cdfd627 (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
31
32
33
34
35
36
37
38
39
#include "project.h"

#if 0
void
assert_failed (u8 *file, u32 line)
{
  // avoid compiler warnings
  (void) file;
  (void) line;

  /* Infinite loop */
  while (1) {
  }
}
#endif

void
delay (__IO u32 n)
{
  /* Decrement nCount value */
  while (n--);
}

void
delay_ms (__IO u32 n)
{
  while (n--)
    delay (483);
}

int
putchar (int c)
{
  if (c == '\n')
    uart_tx ('\r');

  uart_tx (c);
  return (c);
}