Swapped IOCTL order and changed per-char divider
authorTom Knot <tomasknot@gmail.com>
Thu, 14 Jun 2018 09:44:06 +0000 (11:44 +0200)
committerTom Knot <tomasknot@gmail.com>
Thu, 14 Jun 2018 09:44:06 +0000 (11:44 +0200)
modules/unipi/src/unipi_uart.c
version.txt

index ed363c76397eee26fff01c3e787280cf1de56b36..36898ef1c68e7aed3c14e301c7b2112f44040f7e 100644 (file)
@@ -114,23 +114,22 @@ int       neuronspi_uart_ioctl (struct uart_port *port, unsigned int ioctl_code, unsig
 #endif
                return 1;
        }
-       case 0x5480: {
+       case 0x5481: {
 //#if NEURONSPI_DETAILED_DEBUG > 0
                printk(KERN_INFO "NEURONSPI: IOCTL 0x5480\n");
 //#endif
                write_length = neuronspi_spi_compose_single_register_write(NEURONSPI_UART_TIMEOUT_REGISTER, &inp_buf, &outp_buf, (ioctl_arg * 1000000) / n_port->baud);
                printk(KERN_INFO "NEURONSPI: val_upper: %x, val_lower: %x", outp_buf[10], outp_buf[11]);
                neuronspi_spi_send_message(spi, inp_buf, outp_buf, write_length, n_spi->ideal_frequency, 25, 1, 0);
-
                kfree(inp_buf);
                kfree(outp_buf);
                return 0;
        }
-       case 0x5481: {
-#if NEURONSPI_DETAILED_DEBUG > 0
+       case 0x5480: {
+//#if NEURONSPI_DETAILED_DEBUG > 0
                printk(KERN_INFO "NEURONSPI: IOCTL 0x5481\n");
-#endif
-               write_length = neuronspi_spi_compose_single_register_write(NEURONSPI_UART_TIMEOUT_REGISTER, &inp_buf, &outp_buf, ioctl_arg);
+//#endif
+               write_length = neuronspi_spi_compose_single_register_write(NEURONSPI_UART_TIMEOUT_REGISTER, &inp_buf, &outp_buf, ioctl_arg / 10);
                neuronspi_spi_send_message(spi, inp_buf, outp_buf, write_length, n_spi->ideal_frequency, 25, 1, 0);
                kfree(inp_buf);
                kfree(outp_buf);
index 91bb6e5ae0e9613a761349bdd4104b9520ab2a90..bfd2790623f566cd221de61655842e5aac48d59a 100644 (file)
@@ -1 +1 @@
-Repository:neuron-kernel ActiveBranch:[master] PrecedingRelease:v.0.10 PrecedingRevision:40(31707cd) LatestCommit:Thu Jun 14 11:22:02 CEST 2018
+Repository:neuron-kernel ActiveBranch:[master] PrecedingRelease:v.0.10 PrecedingRevision:41(0329dbf) LatestCommit:Thu Jun 14 11:44:07 CEST 2018