Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Drivers
Data Structures | |
| class | AnalogIn |
| An analog input, used for reading the voltage on a pin. More... | |
| class | AnalogOut |
| An analog output, used for setting the voltage on a pin. More... | |
| class | BusIn |
| A digital input bus, used for reading the state of a collection of pins. More... | |
| class | BusInOut |
| A digital input output bus, used for setting the state of a collection of pins. More... | |
| class | BusOut |
| A digital output bus, used for setting the state of a collection of pins. More... | |
| class | CANMessage |
| CANMessage class. More... | |
| class | CAN |
| A can bus client, used for communicating with can devices. More... | |
| class | DigitalIn |
| A digital input, used for reading the state of a pin. More... | |
| class | DigitalInOut |
| A digital input/output, used for setting or reading a bi-directional pin. More... | |
| class | DigitalOut |
| A digital output, used for setting the state of a pin. More... | |
| class | Ethernet |
| An ethernet interface, to use with the ethernet pins. More... | |
| class | FlashIAP |
| Flash IAP driver. More... | |
| class | I2C |
| An I2C Master, used for communicating with I2C slave devices. More... | |
| class | I2CSlave |
| An I2C Slave, used for communicating with an I2C Master device. More... | |
| class | InterruptIn |
| A digital interrupt input, used to call a function on a rising or falling edge. More... | |
| class | InterruptManager |
| Use this singleton if you need to chain interrupt handlers. More... | |
| class | LowPowerTicker |
| Low Power Ticker. More... | |
| class | LowPowerTimeout |
| Low Power Timout. More... | |
| class | LowPowerTimer |
| Low power timer. More... | |
| class | PortIn |
| A multiple pin digital input. More... | |
| class | PortInOut |
| A multiple pin digital in/out used to set/read multiple bi-directional pins. More... | |
| class | PortOut |
| A multiple pin digital output. More... | |
| class | PwmOut |
| A pulse-width modulation digital output. More... | |
| class | QSPI |
| A QSPI Driver, used for communicating with QSPI slave devices. More... | |
| class | RawSerial |
| A serial port (UART) for communication with other serial devices This is a variation of the Serial class that doesn't use streams, thus making it safe to use in interrupt handlers with the RTOS. More... | |
| class | Serial |
| A serial port (UART) for communication with other serial devices. More... | |
| class | SerialBase |
| A base class for serial port implementations Can't be instantiated directly (use Serial or RawSerial) More... | |
| class | SPI |
| A SPI Master, used for communicating with SPI slave devices. More... | |
| class | SPISlave |
| A SPI slave, used for communicating with a SPI master device. More... | |
| class | Ticker |
| A Ticker is used to call a function at a recurring interval. More... | |
| class | Timeout |
| A Timeout is used to call a function at a point in the future. More... | |
| class | Timer |
| A general purpose timer. More... | |
| class | TimerEvent |
| Base abstraction for timer interrupts. More... | |
| class | UARTSerial |
| Class providing buffered UART communication functionality using separate circular buffer for send and receive channels. More... | |
Variables | |
| SingletonPtr< PlatformMutex > | mbed_crc_mutex |
| CRC object provides CRC generation through hardware/software. | |
Variable Documentation
| SingletonPtr<PlatformMutex> mbed_crc_mutex |
CRC object provides CRC generation through hardware/software.
ROM polynomial tables for supported polynomials (:: crc_polynomial_t) will be used for software CRC computation, if ROM tables are not available then CRC is computed runtime bit by bit for all data input.
- Note:
- Synchronization level: Thread safe
- Template Parameters:
-
polynomial CRC polynomial value in hex width CRC polynomial width
Example: Compute CRC data
#include "mbed.h" int main() { MbedCRC<POLY_32BIT_ANSI, 32> ct; char test[] = "123456789"; uint32_t crc = 0; printf("\nPolynomial = 0x%lx Width = %d \n", ct.get_polynomial(), ct.get_width()); ct.compute((void *)test, strlen((const char*)test), &crc); printf("The CRC of data \"123456789\" is : 0x%lx\n", crc); return 0; }
Example: Compute CRC with data available in parts
#include "mbed.h" int main() { MbedCRC<POLY_32BIT_ANSI, 32> ct; char test[] = "123456789"; uint32_t crc = 0; printf("\nPolynomial = 0x%lx Width = %d \n", ct.get_polynomial(), ct.get_width()); ct.compute_partial_start(&crc); ct.compute_partial((void *)&test, 4, &crc); ct.compute_partial((void *)&test[4], 5, &crc); ct.compute_partial_stop(&crc); printf("The CRC of data \"123456789\" is : 0x%lx\n", crc); return 0; }
Generated on Tue Jul 12 2022 19:04:39 by
1.7.2