[riot-notifications] [RIOT-OS/RIOT] tests/periph_spi: add support for printing and testing SPI clock rate… (#16727)

Hugues Larrive notifications at github.com
Wed Sep 1 04:13:38 CEST 2021


@hugueslarrive commented on this pull request.



> +#ifdef CLOCK_APB1 /* STM32 */
+#define HAS_ARBITRARY_BUS_SPEED
+    int clk, tmp;
+
+    for (int i = 0; i < (int)SPI_NUMOF; i++) {
+        printf("\t\tSPI_DEV(%i), ", i);
+        if (spi_config[i].apbbus == APB1) {
+            clk = CLOCK_APB1;
+            printf("CLOCK_APB1 = %luHz\n", (uint32_t)CLOCK_APB1);
+        }
+        else if (spi_config[i].apbbus == APB2) {
+            clk = CLOCK_APB2;
+            printf("CLOCK_APB2 = %luHz\n", (uint32_t)CLOCK_APB2);
+        }
+        else {
+            printf("error: apbbus configuration ");

Sorry but I gave up this part of the code, anyway thanks for the review.

-- 
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/16727#discussion_r699792435
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210831/22b3d771/attachment-0001.htm>


More information about the notifications mailing list