Debugging tool for mbed enabled microcontrollers, especially for NUCLEO-F303RE and STM32F042F6P6.
Diff: Debug.h
- Revision:
- 3:3d7837ae4a37
- Parent:
- 2:478ba8b83e3f
- Child:
- 4:0e22212d2d7e
diff -r 478ba8b83e3f -r 3d7837ae4a37 Debug.h --- a/Debug.h Mon May 06 00:32:53 2019 +0000 +++ b/Debug.h Mon May 06 21:16:37 2019 +0000 @@ -3,11 +3,14 @@ // include files //------------------------------------------------------------------------------------------------------------------ #include "mbed.h" +#include <stdlib.h> + // macros //------------------------------------------------------------------------------------------------------------------ #define name(var) #var - +#define min(a, b) (((a) < (b)) ? (a) : (b)) +#define max(a, b) (((a) > (b)) ? (a) : (b)) // assembly functions //------------------------------------------------------------------------------------------------------------------ @@ -311,7 +314,13 @@ void init(); // clear screen from m line up to n line void clear_from_n_up_to_m(int m, int n); + uint32_t modify_value(uint32_t value, int horizontal); + }; + + + + /** Debug_register_print class. * * Example program: @@ -330,11 +339,11 @@ * * int main(){ * pc.format(2,2,1,3);//breakpoint count,line number, address, value - * pc.breakpoint(__LINE__,0x48000000); + * pc.breakpoint(__LINE__,0x48000000, 0, 2); * DigitalOut out2 (PA_0); - * pc.breakpoint(__LINE__,0x48000000); + * pc.breakpoint(__LINE__,0x48000000, 0x14, -3); * AnalogIn analog2 (PA_1); - * pc.breakpoint(__LINE__,0x48000000); + * pc.breakpoint(__LINE__,0x48000000, 0x8); * * while(1){ * wait(1); @@ -360,7 +369,7 @@ * @param address * @param offset */ - void breakpoint(int line_number = -1, uint32_t address = 0, uint32_t offset = 0); + void breakpoint(int line_number = -1, uint32_t address = 0, uint32_t offset = 0, int number_of_words = 1); protected: