One more part of multiple SPI busses support (not for LPC1224)
authorNathael Pajani <nathael.pajani@ed3l.fr>
Thu, 24 Apr 2014 16:32:33 +0000 (18:32 +0200)
committerNathael Pajani <nathael.pajani@ed3l.fr>
Tue, 8 Nov 2022 16:03:04 +0000 (17:03 +0100)
drivers/ssp.c

index 98f7c83..37d3f54 100644 (file)
@@ -281,7 +281,11 @@ uint32_t ssp_clk_on(uint8_t ssp_num, uint32_t rate)
        } while ((prescale > 0xFF) || (pclk_div > 0xFF));
 
        /* Activate the SSP clock (maybe divide main clock) */
-       sys_ctrl->ssp0_clk_div = pclk_div;
+       switch (ssp_num) {
+               case 0 :
+               sys_ctrl->ssp0_clk_div = pclk_div;
+               break;
+       }
 
        /* Set the prescaler */
        ssp_regs->clk_prescale = prescale;