123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- #include "gd32f10x_dbg.h"
- uint32_t dbg_id_get(void)
- {
- return DBG_ID;
- }
- void dbg_low_power_enable(uint32_t dbg_low_power)
- {
- DBG_CTL |= dbg_low_power;
- }
- void dbg_low_power_disable(uint32_t dbg_low_power)
- {
- DBG_CTL &= ~dbg_low_power;
- }
- void dbg_periph_enable(dbg_periph_enum dbg_periph)
- {
- DBG_CTL |= (uint32_t)dbg_periph;
- }
- void dbg_periph_disable(dbg_periph_enum dbg_periph)
- {
- DBG_CTL &= ~(uint32_t)dbg_periph;
- }
- void dbg_trace_pin_enable(void)
- {
- DBG_CTL |= DBG_CTL_TRACE_IOEN;
- }
- void dbg_trace_pin_disable(void)
- {
- DBG_CTL &= ~DBG_CTL_TRACE_IOEN;
- }
- void dbg_trace_pin_mode_set(uint32_t trace_mode)
- {
- DBG_CTL &= ~DBG_CTL_TRACE_MODE;
- DBG_CTL |= trace_mode;
- }
|