[riot-notifications] [RIOT-OS/RIOT] TI CC3200 SimpleLink RIOT support (#11866)

Wlad Meixner notifications at github.com
Sat May 30 12:52:11 CEST 2020


@gosticks commented on this pull request.



> +}
+
+void spi_init(spi_t bus)
+{
+    /* assert(bus >= SPI_NUMOF); */
+    mutex_init(&locks[bus]);
+
+    /* CC3100 module does not require pin config */
+    if (bus != CC3100_SPI) {
+        /* trigger pin initialization */
+        spi_init_pins(bus);
+    }
+
+    /* enable clock */
+    switch (bus) {
+    case EXTERNAL_SPI:

`LSPI_BASE` is controlled by `MCSPI_A1` and `GSPI_BASE` is controlled by `MCSPI_A2` so in that sense the later is the case. My idea was that `&ARCM->MCSPI_A1 + bus * 0x1C` will return `MCSPI_A2` when `bus == 1`. I could put it into a separate method to make it more clear. 
I would move `PRCM_SLP_MODE_CLK` to the board specific SPI config and extract the value via the `PRCM_MODE_CLK_MASK` 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11866#discussion_r432831624
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200530/571306ee/attachment.htm>


More information about the notifications mailing list