Debugging tool for mbed enabled microcontrollers, especially for NUCLEO-F303RE and STM32F042F6P6.
Diff: Debug.h
- Revision:
- 15:83d4dced2a28
- Parent:
- 12:a8ab6e018422
- Child:
- 16:7fc964b6d127
--- a/Debug.h Mon May 13 11:04:54 2019 +0000 +++ b/Debug.h Mon May 27 02:11:53 2019 +0000 @@ -12,19 +12,7 @@ #define min(a, b) (((a) < (b)) ? (a) : (b)) #define max(a, b) (((a) > (b)) ? (a) : (b)) -// assembly functions -//------------------------------------------------------------------------------------------------------------------ -extern "C" int check_1_bit(uint32_t gpiox, uint32_t offset, uint32_t pin); -extern "C" int check_2_bit(uint32_t gpiox, uint32_t offset, uint32_t pin); -extern "C" int check_alternative_mode(uint32_t gpiox, uint32_t offset, uint32_t pin); -extern "C" int read_word(uint32_t address, uint32_t offset); -// structs -//------------------------------------------------------------------------------------------------------------------ -typedef struct Pin { - char port; - int number; -} pin_t; //------------------------------------------------------------------------------------------------------------------ /** Debug_serial class. @@ -326,8 +314,12 @@ void init(); // clear screen from m line up to n line void clear_from_n_up_to_m(int m, int n); - //modify actual address or register value according to position in terminal + // modify actual address or register value according to position in terminal uint32_t modify_value(uint32_t value, int horizontal); + // print address and register value + void print_break(uint32_t address); + // print number in binary form + void print_binary(uint32_t value); }; //------------------------------------------------------------------------------------------------------------------