diff --git a/src/include/rtt.h b/src/include/rtt.h index 7d8f04a..dc8756a 100644 --- a/src/include/rtt.h +++ b/src/include/rtt.h @@ -1,3 +1,29 @@ +/* + * This file is part of the Black Magic Debug project. + * + * MIT License + * + * Copyright (c) 2021 Koen De Vleeschauwer + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + #ifndef RTT_H #define RTT_H #include @@ -29,6 +55,6 @@ struct rtt_channel_struct { extern struct rtt_channel_struct rtt_channel[MAX_RTT_CHAN]; // true if target memory access does not work when target running -extern bool target_no_background_memory_access(target *cur_target); -extern void poll_rtt(target *cur_target); +bool target_no_background_memory_access(target *cur_target); +void poll_rtt(target *cur_target); #endif diff --git a/src/include/rtt_if.h b/src/include/rtt_if.h index 711be5e..a6f70d5 100644 --- a/src/include/rtt_if.h +++ b/src/include/rtt_if.h @@ -1,3 +1,29 @@ +/* + * This file is part of the Black Magic Debug project. + * + * MIT License + * + * Copyright (c) 2021 Koen De Vleeschauwer + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + #ifndef RTT_IF_H #define RTT_IF_H /* rtt i/o to terminal */ @@ -22,15 +48,15 @@ #endif /* hosted initialisation */ -extern int rtt_if_init(void); +int rtt_if_init(void); /* hosted teardown */ -extern int rtt_if_exit(void); +int rtt_if_exit(void); /* target to host: write len bytes from the buffer starting at buf. return number bytes written */ -extern uint32_t rtt_write(const char *buf, uint32_t len); +uint32_t rtt_write(const char *buf, uint32_t len); /* host to target: read one character, non-blocking. return character, -1 if no character */ -extern int32_t rtt_getchar(); +int32_t rtt_getchar(); /* host to target: true if no characters available for reading */ -extern bool rtt_nodata(); +bool rtt_nodata(); #endif