Mercurial > ~darius > hgwebdir.cgi > stm32test
annotate delay.c @ 12:093bc0c3b1cc
Add delay, ellipse and line demos.
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Mon, 06 Feb 2012 23:55:53 +1030 |
parents | 58d76cf522ff |
children |
rev | line source |
---|---|
8
58d76cf522ff
Split out code into separate files.
Daniel O'Connor <darius@dons.net.au>
parents:
diff
changeset
|
1 #include <stdint.h> |
58d76cf522ff
Split out code into separate files.
Daniel O'Connor <darius@dons.net.au>
parents:
diff
changeset
|
2 #include "stm32f10x.h" |
58d76cf522ff
Split out code into separate files.
Daniel O'Connor <darius@dons.net.au>
parents:
diff
changeset
|
3 #include "delay.h" |
58d76cf522ff
Split out code into separate files.
Daniel O'Connor <darius@dons.net.au>
parents:
diff
changeset
|
4 |
58d76cf522ff
Split out code into separate files.
Daniel O'Connor <darius@dons.net.au>
parents:
diff
changeset
|
5 /* This is a bit rough and ready */ |
58d76cf522ff
Split out code into separate files.
Daniel O'Connor <darius@dons.net.au>
parents:
diff
changeset
|
6 void |
58d76cf522ff
Split out code into separate files.
Daniel O'Connor <darius@dons.net.au>
parents:
diff
changeset
|
7 delay(__IO uint32_t nCount) { |
58d76cf522ff
Split out code into separate files.
Daniel O'Connor <darius@dons.net.au>
parents:
diff
changeset
|
8 __IO uint32_t i; |
58d76cf522ff
Split out code into separate files.
Daniel O'Connor <darius@dons.net.au>
parents:
diff
changeset
|
9 |
58d76cf522ff
Split out code into separate files.
Daniel O'Connor <darius@dons.net.au>
parents:
diff
changeset
|
10 for(; nCount != 0; nCount--) |
58d76cf522ff
Split out code into separate files.
Daniel O'Connor <darius@dons.net.au>
parents:
diff
changeset
|
11 for (i = 0; i < 3900; i++) |
58d76cf522ff
Split out code into separate files.
Daniel O'Connor <darius@dons.net.au>
parents:
diff
changeset
|
12 ; |
58d76cf522ff
Split out code into separate files.
Daniel O'Connor <darius@dons.net.au>
parents:
diff
changeset
|
13 } |
58d76cf522ff
Split out code into separate files.
Daniel O'Connor <darius@dons.net.au>
parents:
diff
changeset
|
14 |