diff options
Diffstat (limited to 'bsp/drivers')
-rw-r--r-- | bsp/drivers/clic/clic_driver.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bsp/drivers/clic/clic_driver.c b/bsp/drivers/clic/clic_driver.c index 66b24d6..0612e58 100644 --- a/bsp/drivers/clic/clic_driver.c +++ b/bsp/drivers/clic/clic_driver.c @@ -92,7 +92,7 @@ uint8_t clic_set_int_level( clic_instance_t * this_clic, uint32_t source, uint8_ //shift level right to mask off unused bits level = level>>((this_clic->num_config_bits)-nlbits); //plus this_clic->nmbits which is always 0 for now. //shift level into correct bit position - level = level << (8-((this_clic->num_config_bits)-nlbits)); + level = level << (8-this_clic->num_config_bits) + (this_clic->num_config_bits - nlbits); //write to clicintcfg uint8_t current_intcfg = clic_get_intcfg(this_clic, source); @@ -114,7 +114,7 @@ uint8_t clic_get_int_level( clic_instance_t * this_clic, uint32_t source) { level = level >> (8-(this_clic->num_config_bits)); //shift level right to mask off priority bits - level = level>>((this_clic->num_config_bits)-nlbits); //this_clic->nmbits which is always 0 for now. + level = level>>(this_clic->num_config_bits-nlbits); //this_clic->nmbits which is always 0 for now. return level; } |