1 /* SPDX-License-Identifier: BSD-2-Clause */ 2 /* 3 * Copyright (c) 2021, Microchip 4 */ 5 #ifndef __DRIVERS_ATMEL_RSTC_H 6 #define __DRIVERS_ATMEL_RSTC_H 7 8 #include <compiler.h> 9 #include <stdbool.h> 10 11 #if defined(CFG_ATMEL_RSTC) 12 bool atmel_rstc_available(void); 13 14 void __noreturn atmel_rstc_reset(void); 15 void sam_rstc_usb_por(unsigned char id, bool enable); 16 #else 17 static inline bool atmel_rstc_available(void) 18 { 19 return false; 20 } 21 22 static inline void atmel_rstc_reset(void) {} 23 static inline void sam_rstc_usb_por(unsigned char id __unused, 24 bool enable __unused) {} 25 #endif 26 27 #endif /* __DRIVERS_ATMEL_RSTC_H */ 28