summaryrefslogtreecommitdiff
path: root/bsp
diff options
context:
space:
mode:
Diffstat (limited to 'bsp')
-rw-r--r--bsp/drivers/clic/clic_driver.c18
-rw-r--r--bsp/drivers/clic/clic_driver.h8
2 files changed, 12 insertions, 14 deletions
diff --git a/bsp/drivers/clic/clic_driver.c b/bsp/drivers/clic/clic_driver.c
index 8acf4d2..a4c4694 100644
--- a/bsp/drivers/clic/clic_driver.c
+++ b/bsp/drivers/clic/clic_driver.c
@@ -67,22 +67,20 @@ void clic_clear_pending(clic_instance_t * this_clic, uint32_t source){
*(volatile uint8_t*)(this_clic->hart_addr+CLIC_INTIP+source) = 0;
}
-//should return max level set. if level set doesn't match requested, check nlbits
-void clic_set_level (clic_instance_t * this_clic, uint32_t source, uint32_t level){
-
+void clic_set_intcfg (clic_instance_t * this_clic, uint32_t source, uint32_t intcfg){
+ *(volatile uint8_t*)(this_clic->hart_addr+CLIC_INTCFG+source) = intcfg;
}
-void clic_get_level (clic_instance_t * this_clic, uint32_t source, uint32_t level){
-
+uint8_t clic_get_intcfg (clic_instance_t * this_clic, uint32_t source){
+ return *(volatile uint8_t*)(this_clic->hart_addr+CLIC_INTCFG+source);
}
-void clic_set_priority (clic_instance_t * this_clic, uint32_t source, uint32_t priority){
-
+void clic_set_cliccfg (clic_instance_t * this_clic, uint32_t cfg){
+ *(volatile uint8_t*)(this_clic->hart_addr+CLIC_CFG) = cfg;
}
-void clic_get_priority (clic_instance_t * this_clic, uint32_t source, uint32_t priority){
-
-
+uint8_t clic_get_cliccfg (clic_instance_t * this_clic){
+ return *(volatile uint8_t*)(this_clic->hart_addr+CLIC_CFG);
}
diff --git a/bsp/drivers/clic/clic_driver.h b/bsp/drivers/clic/clic_driver.h
index 6e8cf0b..1fd9bb6 100644
--- a/bsp/drivers/clic/clic_driver.h
+++ b/bsp/drivers/clic/clic_driver.h
@@ -26,10 +26,10 @@ void clic_enable_interrupt (clic_instance_t * this_clic, uint32_t source);
void clic_disable_interrupt (clic_instance_t * this_clic, uint32_t source);
void clic_set_pending(clic_instance_t * this_clic, uint32_t source);
void clic_clear_pending(clic_instance_t * this_clic, uint32_t source);
-void clic_set_level (clic_instance_t * this_clic, uint32_t source, uint32_t priority);
-void clic_get_level (clic_instance_t * this_clic, uint32_t source, uint32_t priority);
-void clic_set_priority (clic_instance_t * this_clic, uint32_t source, uint32_t priority);
-void clic_get_priority (clic_instance_t * this_clic, uint32_t source, uint32_t priority);
+void clic_set_intcfg (clic_instance_t * this_clic, uint32_t source, uint32_t intcfg);
+uint8_t clic_get_intcfg (clic_instance_t * this_clic, uint32_t source);
+void clic_set_cliccfg (clic_instance_t * this_clic, uint32_t cfg);
+uint8_t clic_get_cliccfg (clic_instance_t * this_clic);
__END_DECLS