Bruno Allaire-Lemay
/
APP1test
df
Fork of APP1 by
Diff: TestHomemadeMbed.cpp
- Revision:
- 14:2f89279586cb
- Parent:
- 13:bb9669053eb3
- Child:
- 15:b38d9d210e32
diff -r bb9669053eb3 -r 2f89279586cb TestHomemadeMbed.cpp --- a/TestHomemadeMbed.cpp Mon Jan 16 00:06:45 2017 +0000 +++ b/TestHomemadeMbed.cpp Mon Jan 16 02:28:40 2017 +0000 @@ -17,22 +17,22 @@ { //CLKOUTCFG - 0x400F C1C8 //Bits 0-9 all have a reset value of 0 - assert(0x00 == read_bits(reinterpret_cast<int*>(0x400FC1C8), 0, 9)); + assert(0x00 == read_bits(reinterpret_cast<unsigned int*>(0x400FC1C8), 0, 9)); //PCONP - address 0x400F C0C4 //Bits 1,2,3,4 all have a reset value of 1 - assert(0x0F == read_bits(reinterpret_cast<int*>(0x400FC0C4), 1, 4)); + assert(0x0F == read_bits(reinterpret_cast<unsigned int*>(0x400FC0C4), 1, 4)); } void test_write_bits() { //CLKOUTCFG - 0x400F C1C8 //Bits 0-9 all have a reset value of 0 - assert(0x00 == read_bits(reinterpret_cast<int*>(0x400FC1C8), 0, 9)); + assert(0x00 == read_bits(reinterpret_cast<unsigned int*>(0x400FC1C8), 0, 9)); - write_bits(reinterpret_cast<int*>(0x400FC1C8), 4, 7, 0x0F); + write_bits(reinterpret_cast<unsigned int*>(0x400FC1C8), 4, 7, 0x0F); - assert(0x0F == read_bits(reinterpret_cast<int*>(0x400FC1C8), 4, 7)); - write_bits(reinterpret_cast<int*>(0x400FC1C8), 4, 7, 0x00); + assert(0x0F == read_bits(reinterpret_cast<unsigned int*>(0x400FC1C8), 4, 7)); + write_bits(reinterpret_cast<unsigned int*>(0x400FC1C8), 4, 7, 0x00); } } \ No newline at end of file