Skip to content

Commit

Permalink
rename as mcp canbus, prepare to publish to library index
Browse files Browse the repository at this point in the history
  • Loading branch information
sidney2007 committed Oct 31, 2023
1 parent 7a2aec0 commit b45437a
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 42 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 @ Longan Labs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
36 changes: 6 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# CAN Bus Library

[![Actions Status](https://github.com/arduino/arduino-cli-example/workflows/test/badge.svg)](https://github.com/arduino/arduino-cli-example/actions)
[![Spell Check](https://github.com/arduino/compile-sketches/workflows/Spell%20Check/badge.svg)](https://github.com/arduino/compile-sketches/actions?workflow=Spell+Check)
[![codecov](https://codecov.io/gh/arduino/compile-sketches/branch/main/graph/badge.svg?token=Uv6f1ebMZ4)](https://codecov.io/gh/arduino/compile-sketches)
[![GitHub](https://img.shields.io/github/license/Longan-Labs/Arduino_CAN_BUS_MCP2515)](https://github.com/Longan-Labs/Arduino_CAN_BUS_MCP2515/blob/master/LICENSE)
[![Installation instructions](https://www.ardu-badge.com/badge/mcp_canbus.svg?)](https://www.ardu-badge.com/mcp_canbus)
[![GitHub version](https://img.shields.io/github/release/Longan-Labs/Arduino_CAN_BUS_MCP2515.svg?logo=github&logoColor=ffffff)](https://github.com/Longan-Labs/Arduino_CAN_BUS_MCP2515/releases/latest)
[![GitHub Release Date](https://img.shields.io/github/release-date/Longan-Labs/Arduino_CAN_BUS_MCP2515.svg?logo=github&logoColor=ffffff)](https://github.com/Longan-Labs/Arduino_CAN_BUS_MCP2515/releases/latest)
[![GitHub Repo stars](https://img.shields.io/github/stars/Longan-Labs/Arduino_CAN_BUS_MCP2515?logo=github&logoColor=ffffff)](https://github.com/Longan-Labs/Arduino_CAN_BUS_MCP2515/stargazers)
[![GitHub issues](https://img.shields.io/github/issues/Longan-Labs/Arduino_CAN_BUS_MCP2515.svg?logo=github&logoColor=ffffff)](https://github.com/Longan-Labs/Arduino_CAN_BUS_MCP2515/issues)

Arduino library for MCP2515, it's available for most of theArduino boards, we test it with Arduino UNO, Leonardo, Mega as well as Zero.

Expand Down Expand Up @@ -119,32 +121,6 @@ If you need a Dev board, plese try,
- [CANBed M0](https://www.longan-labs.cc/1030014.html)
- [OBD-II CAN Bus GPS Dev Kit](https://www.longan-labs.cc/1030003.html)
## License
```
MIT License

Copyright (c) 2018 @ Longan Labs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```
## Contact us
If you have any question, please feel free to contact [[email protected]]([email protected])
Expand Down
2 changes: 1 addition & 1 deletion examples/OBDII_PIDs/getRpm/getRpm.ino
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
***************************************************************************************************/

#include <SPI.h>
#include "mcp_can.h"
#include <mcp_canbus.h>

/* Please modify SPI_CS_PIN to adapt to your board.
Expand Down
2 changes: 1 addition & 1 deletion examples/OBDII_PIDs/getSpeed/getSpeed.ino
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
***************************************************************************************************/

#include <SPI.h>
#include "mcp_can.h"
#include <mcp_canbus.h>

/* Please modify SPI_CS_PIN to adapt to your board.
Expand Down
2 changes: 1 addition & 1 deletion examples/recv/recv.ino
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*/

#include <SPI.h>
#include "mcp_can.h"
#include <mcp_canbus.h>

/* Please modify SPI_CS_PIN to adapt to your board.
Expand Down
2 changes: 1 addition & 1 deletion examples/send/send.ino
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#define CAN_1000KBPS 18
*/

#include <mcp_can.h>
#include <mcp_canbus.h>
#include <SPI.h>

/* Please modify SPI_CS_PIN to adapt to your board.
Expand Down
5 changes: 1 addition & 4 deletions examples/set_mask_filter_recv/set_mask_filter_recv.ino
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@
*/
#include <SPI.h>
#include "mcp_can.h"

#include <SPI.h>
#include "mcp_can.h"
#include <mcp_canbus.h>

/* Please modify SPI_CS_PIN to adapt to your board.
Expand Down
2 changes: 1 addition & 1 deletion examples/set_mask_filter_send/set_mask_filter_send.ino
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
OBD-II CAN Bus GPS Dev Kit: https://www.longan-labs.cc/1030003.html
*/

#include <mcp_can.h>
#include <mcp_canbus.h>
#include <SPI.h>

/* Please modify SPI_CS_PIN to adapt to your board.
Expand Down
4 changes: 2 additions & 2 deletions library.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name=Arduino CAN Bus Library for MCP2515
name=mcp_canbus
version=1.0.0
author=Longan Labs
maintainer=Longan Labs
sentence=A library for MCP2515
paragraph=Arduino CAN Bus Library for MCP2515
category=CAN Bus
category=Communication
url=https://github.com/Longan-Labs/Aruino_CAN_BUS_MCP2515
architectures=*
2 changes: 1 addition & 1 deletion mcp_can.cpp → mcp_canbus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
#include "mcp_can.h"
#include "mcp_canbus.h"

#define spi_readwrite SPI.transfer
#define spi_read() spi_readwrite(0x00)
Expand Down
File renamed without changes.

0 comments on commit b45437a

Please sign in to comment.