summaryrefslogtreecommitdiffstats
path: root/include/writeprotect.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/writeprotect.h')
-rw-r--r--include/writeprotect.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/writeprotect.h b/include/writeprotect.h
index 12926c4d3..7ceed0792 100644
--- a/include/writeprotect.h
+++ b/include/writeprotect.h
@@ -89,4 +89,10 @@ enum flashrom_wp_result wp_get_available_ranges(struct flashrom_wp_ranges **, st
/* Checks if writeprotect functions can be used with the current flash/programmer */
bool wp_operations_available(struct flashrom_flashctx *);
+/*
+ * Converts a writeprotect config to register values and masks that indicate which register bits affect WP state.
+ * reg_values, bit_masks, and write_masks must all have length of at least MAX_REGISTERS.
+ */
+enum flashrom_wp_result wp_cfg_to_reg_values(uint8_t *reg_values, uint8_t *bit_masks, uint8_t *write_masks, struct flashrom_flashctx *, const struct flashrom_wp_cfg *);
+
#endif /* !__WRITEPROTECT_H__ */