-
Notifications
You must be signed in to change notification settings - Fork 573
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mcp25xx add read and write methods (#1959)
* add read and write methods for mcp2515 * fix add file to sln * add bitrates and first test * add test to bitrate * set mode test * add examples * add to Readme read and write operations * delete tabs * use stackalloc * refactor bitrate * fix documentation add max message size * change read and write data to CanMessage object from byte array * separate canMessage to received and sending message * add tests * extract enum to another file * fix file formatting * Make reading work for test device Read should provide the data first, not test for it * ReadAllBuffers private * add ReceiveBuffer property to ReceivedCanMessage Co-authored-by: Patrick Grawehr <pgrawehr@hotmail.com>
- Loading branch information
1 parent
51a3e80
commit 895d5e5
Showing
14 changed files
with
996 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
namespace Iot.Device.Mcp25xxx | ||
{ | ||
/// <summary> | ||
/// Standard Frequency and Speed for CAN bus | ||
/// </summary> | ||
public enum FrequencyAndSpeed | ||
{ | ||
/// <summary> | ||
/// 8MHz 1000kBPS | ||
/// </summary> | ||
_8MHz1000KBps, | ||
|
||
/// <summary> | ||
/// 8MHz 500kBPS | ||
/// </summary> | ||
_8MHz500KBps, | ||
|
||
/// <summary> | ||
/// 8MHz 250kBPS | ||
/// </summary> | ||
_8MHz250KBps, | ||
|
||
/// <summary> | ||
/// 8MHz 200kBPS | ||
/// </summary> | ||
_8MHz200KBps, | ||
|
||
/// <summary> | ||
/// 8MHz 125kBPS | ||
/// </summary> | ||
_8MHz125KBps, | ||
|
||
/// <summary> | ||
/// 8MHz 100kBPS | ||
/// </summary> | ||
_8MHz100KBps, | ||
|
||
/// <summary> | ||
/// 8MHz 80kBPS | ||
/// </summary> | ||
_8MHz80KBps, | ||
|
||
/// <summary> | ||
/// 8MHz 50kBPS | ||
/// </summary> | ||
_8MHz50KBps, | ||
|
||
/// <summary> | ||
/// 8MHz 40kBPS | ||
/// </summary> | ||
_8MHz40KBps, | ||
|
||
/// <summary> | ||
/// 8MHz 20kBPS | ||
/// </summary> | ||
_8MHz20KBps, | ||
|
||
/// <summary> | ||
/// 8MHz 10kBPS | ||
/// </summary> | ||
_8MHz10KBps, | ||
|
||
/// <summary> | ||
/// 8MHz 5kBPS | ||
/// </summary> | ||
_8MHz5KBps, | ||
|
||
/// <summary> | ||
/// 16MHz 1000kBPS | ||
/// </summary> | ||
_16MHz1000KBps, | ||
|
||
/// <summary> | ||
/// 16MHz 500kBPS | ||
/// </summary> | ||
_16MHz500KBps, | ||
|
||
/// <summary> | ||
/// 16MHz 250kBPS | ||
/// </summary> | ||
_16MHz250KBps, | ||
|
||
/// <summary> | ||
/// 16MHz 200kBPS | ||
/// </summary> | ||
_16MHz200KBps, | ||
|
||
/// <summary> | ||
/// 16MHz 125kBPS | ||
/// </summary> | ||
_16MHz125KBps, | ||
|
||
/// <summary> | ||
/// 16MHz 100kBPS | ||
/// </summary> | ||
_16MHz100KBps, | ||
|
||
/// <summary> | ||
/// 16MHz 80kBPS | ||
/// </summary> | ||
_16MHz80KBps, | ||
|
||
/// <summary> | ||
/// 16MHz 50kBPS | ||
/// </summary> | ||
_16MHz50KBps, | ||
|
||
/// <summary> | ||
/// 16MHz 40kBPS | ||
/// </summary> | ||
_16MHz40KBps, | ||
|
||
/// <summary> | ||
/// 16MHz 20kBPS | ||
/// </summary> | ||
_16MHz20KBps, | ||
|
||
/// <summary> | ||
/// 16MHz 10kBPS | ||
/// </summary> | ||
_16MHz10KBps, | ||
|
||
/// <summary> | ||
/// 16MHz 5kBPS | ||
/// </summary> | ||
_16MHz5KBps, | ||
|
||
/// <summary> | ||
/// 20MHz 1000kBPS | ||
/// </summary> | ||
_20MHz1000KBps, | ||
|
||
/// <summary> | ||
/// 20MHz 500kBPS | ||
/// </summary> | ||
_20MHz500KBps, | ||
|
||
/// <summary> | ||
/// 20MHz 250kBPS | ||
/// </summary> | ||
_20MHz250KBps, | ||
|
||
/// <summary> | ||
/// 20MHz 200kBPS | ||
/// </summary> | ||
_20MHz200KBps, | ||
|
||
/// <summary> | ||
/// 20MHz 125kBPS | ||
/// </summary> | ||
_20MHz125KBps, | ||
|
||
/// <summary> | ||
/// 20MHz 100kBPS | ||
/// </summary> | ||
_20MHz100KBps, | ||
|
||
/// <summary> | ||
/// 20MHz 80kBPS | ||
/// </summary> | ||
_20MHz80KBps, | ||
|
||
/// <summary> | ||
/// 20MHz 50kBPS | ||
/// </summary> | ||
_20MHz50KBps, | ||
|
||
/// <summary> | ||
/// 20MHz 40kBPS | ||
/// </summary> | ||
_20MHz40KBps, | ||
} | ||
} |
Oops, something went wrong.