1 /* 2 * Copyright (c) 2025 Nordic Semiconductor ASA 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef NRFS_INTERNAL_SWEXT_H 8 #define NRFS_INTERNAL_SWEXT_H 9 10 #include <internal/services/nrfs_generic.h> 11 12 #ifdef __cplusplus 13 extern "C" { 14 #endif 15 16 /** @brief SWEXT pdclamp options. */ 17 typedef enum __NRFS_PACKED { 18 SWEXT_PD_CLAMP_DISABLED, 19 SWEXT_PD_CLAMP_ENABLED 20 } swext_pd_clamp_t; 21 22 /** @brief SWEXT data structure. */ 23 typedef union __NRFS_PACKED { 24 swext_pd_clamp_t pd_clamp_control; /** < Powerdown ground clamp configuration. */ 25 uint8_t load_current; /** < Load current in 500uA steps. */ 26 } nrfs_swext_data_t; 27 28 /** @brief SWEXT request structure. */ 29 typedef struct __NRFS_PACKED { 30 nrfs_hdr_t hdr; /**< Header of the message. */ 31 nrfs_ctx_t ctx; /**< Context of the message. */ 32 nrfs_swext_data_t data; /**< Data of the request. */ 33 } nrfs_swext_req_t; 34 35 /** @brief SWEXT response status. */ 36 typedef enum __NRFS_PACKED { 37 SWEXT_OUTPUT_ENABLED, 38 SWEXT_OVERCURRENT 39 } nrfs_swext_status_t; 40 41 /** @brief SWEXT notification structure. */ 42 typedef struct __NRFS_PACKED { 43 nrfs_hdr_t hdr; /**< Header of the message. */ 44 nrfs_ctx_t ctx; /**< Context of the message. */ 45 nrfs_swext_status_t status; /**< Data of the request. */ 46 } nrfs_swext_rsp_t; 47 48 #ifdef __cplusplus 49 } 50 #endif 51 52 #endif /* NRFS_INTERNAL_SWEXT_H */ 53