]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1_FreedomStudio/freedom-metal/metal/pmp.h
Update RISCC-V-RV32-SiFive_HiFive1_FreedomStudio project to latest tools and metal...
[freertos] / FreeRTOS / Demo / RISC-V_RV32_SiFive_HiFive1_FreedomStudio / freedom-metal / metal / pmp.h
index 9121b10a14774ad8053b4a19938264317b4f510f..d948656c83b10861d61d2eff2d7187e2f7893563 100644 (file)
@@ -42,11 +42,11 @@ enum metal_pmp_address_mode {
  */
 struct metal_pmp_config {
     /*! @brief Sets whether reads to the PMP region succeed */
-    int R : 1;
+    unsigned int R : 1;
     /*! @brief Sets whether writes to the PMP region succeed */
-    int W : 1;
+    unsigned int W : 1;
     /*! @brief Sets whether the PMP region is executable */
-    int X : 1;
+    unsigned int X : 1;
 
     /*! @brief Sets the addressing mode of the PMP region */
     enum metal_pmp_address_mode A : 2;
@@ -73,6 +73,11 @@ struct metal_pmp {
  */
 struct metal_pmp *metal_pmp_get_device(void);
 
+/*!
+ * @brief Get the number of pmp regions for the hartid
+ */
+int metal_pmp_num_regions(int hartid);
+
 /*!
  * @brief Initialize the PMP
  * @param pmp The PMP device handle to be initialized