MCPcopy Create free account
hub / github.com/defold/defold / UpdateCRC16

Function UpdateCRC16

engine/hid/src/test/test_hid.cpp:342–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340}
341
342static uint16_t UpdateCRC16(uint16_t crc, const char* string)
343{
344 while (*string)
345 {
346 crc = (uint16_t) (CRC16ForByte((uint8_t) crc ^ (uint8_t) *string++) ^ (crc >> 8));
347 }
348 return crc;
349}
350
351// Reference implementation from SDL_joystick.c, using Defold types and helpers.
352static dmHID::GamepadGuid SDLCreateJoystickGUIDReference(uint16_t bus, uint16_t vendor, uint16_t product, uint16_t version, const char* vendor_name, const char* product_name, uint8_t driver_signature, uint8_t driver_data)

Callers 1

Calls 1

CRC16ForByteFunction · 0.85

Tested by

no test coverage detected