11

Dependents:   yezhong_main_controller_copy_3_

Files at this revision

API Documentation at this revision

Comitter:
yezhong
Date:
Tue Mar 01 08:49:53 2022 +0000
Parent:
9:4129ee73824c
Commit message:
1

Changed in this revision

CAN3.cpp Show annotated file Show diff for this revision Revisions of this file
mcp2515.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 4129ee73824c -r c0b402665e50 CAN3.cpp
--- a/CAN3.cpp	Mon Dec 20 01:23:18 2021 +0000
+++ b/CAN3.cpp	Tue Mar 01 08:49:53 2022 +0000
@@ -8,7 +8,7 @@
 
 CAN3::CAN3(SPI& _spi, PinName ncs)//, PinName itr)
         : spi(_spi), _mcp(spi, ncs) {//, _itr(itr) {
-    printf("\n\rcan = %d",this);
+   // printf("\n\rcan = %d",this);
 
 }
 
diff -r 4129ee73824c -r c0b402665e50 mcp2515.cpp
--- a/mcp2515.cpp	Mon Dec 20 01:23:18 2021 +0000
+++ b/mcp2515.cpp	Tue Mar 01 08:49:53 2022 +0000
@@ -134,7 +134,7 @@
     //struct spi_device *spi = to_spi_device(can->cdev.dev);
     //struct mcp251x *chip = dev_get_drvdata(&spi->dev);
     //struct mcp251x_platform_data *pdata = spi->dev.platform_data;
-        printf("\n\rcanspeed=%d",bit_rate);
+       // printf("\n\rcanspeed=%d",bit_rate);
     int f_osc = 8000000;
     int tqs; /* tbit/TQ */
     int brp;
@@ -170,8 +170,8 @@
         ps2++;
     sjw = 1;
 
-    printf("\n\rbit rate: BRP = %d, Tbit = %d TQ, PropSeg = %d, PS1 = %d, PS2 = %d, SJW = %d\n",
-        brp, tqs, propseg, ps1, ps2, sjw);
+   // printf("\n\rbit rate: BRP = %d, Tbit = %d TQ, PropSeg = %d, PS1 = %d, PS2 = %d, SJW = %d\n",
+     //   brp, tqs, propseg, ps1, ps2, sjw);
 
     /* Since we can only change the bit rate when the network device is
      * down the chip must be in sleep mode. Wake it up and put it into
@@ -556,10 +556,10 @@
     rec  = readRegister(MCP_REC);
     eflg = readRegister(MCP_EFLG);
 
-    printf("MCP2515 Extended Status:\n\r");
-    printf("MCP Transmit Error Count %d \r\n", tec);
-    printf("MCP Receiver Error Count %d \n\r", rec);
-    printf("MCP Error Flag %d\n\r", eflg);
+   // printf("MCP2515 Extended Status:\n\r");
+   // printf("MCP Transmit Error Count %d \r\n", tec);
+   // printf("MCP Receiver Error Count %d \n\r", rec);
+   // printf("MCP Error Flag %d\n\r", eflg);
 
     if ( (rec>127) || (tec>127) ) {
         printf("Error-Passive or Bus-Off\n\r");