diff --git a/programming_pointers/.gitignore b/programming_pointers/.gitignore new file mode 100644 index 0000000..3df573f --- /dev/null +++ b/programming_pointers/.gitignore @@ -0,0 +1 @@ +/Debug/ diff --git a/programming_pointers/.launches/programming_pointers.launch b/programming_pointers/.launches/programming_pointers.launch new file mode 100644 index 0000000..3d0d541 --- /dev/null +++ b/programming_pointers/.launches/programming_pointers.launch @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/programming_pointers/pointer_example_main.c b/programming_pointers/pointer_example_main.c index b7e4c6f..88fa653 100644 --- a/programming_pointers/pointer_example_main.c +++ b/programming_pointers/pointer_example_main.c @@ -80,7 +80,7 @@ int main(void) // Example 4: having fun with pointers and arithmetic operations on them // You can also learn about Big-endian little-endian. Read about it here: https://en.wikipedia.org/wiki/Endianness Which one is MSP432? Big or little endian? unsigned int N = 0x11223344; - unsigned char *Nptr = &N; //There will be a warning here. Why? + unsigned char *Nptr = (unsigned char *)&N; //There will be a warning here. Why? printf("%02x\n",*Nptr); for (i = 0; i<4; i++) diff --git a/programming_structs/.gitignore b/programming_structs/.gitignore new file mode 100644 index 0000000..3df573f --- /dev/null +++ b/programming_structs/.gitignore @@ -0,0 +1 @@ +/Debug/ diff --git a/programming_structs/.launches/programming_structs.launch b/programming_structs/.launches/programming_structs.launch new file mode 100644 index 0000000..eceeb03 --- /dev/null +++ b/programming_structs/.launches/programming_structs.launch @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + +