Add usb_command_set_i2c_baud_rate.[ch]
This commit is contained in:
@@ -0,0 +1,10 @@
|
|||||||
|
#include "usb_protocol_handler.h"
|
||||||
|
#include "usb_commands/usb_command_set_i2c_baud_rate.h"
|
||||||
|
#include "init_peripherals.h"
|
||||||
|
|
||||||
|
void UsbCommand_SetI2cBaudRate(void)
|
||||||
|
{
|
||||||
|
uint32_t i2cBaudRate = GetUsbRxBufferUint32(1);
|
||||||
|
I2cMainBusBaudRateBps = i2cBaudRate;
|
||||||
|
ReinitI2cMainBus();
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#ifndef __USB_COMMAND_SET_I2C_BAUD_RATE__
|
||||||
|
#define __USB_COMMAND_SET_I2C_BAUD_RATE__
|
||||||
|
|
||||||
|
// Functions:
|
||||||
|
|
||||||
|
void UsbCommand_SetI2cBaudRate(void);
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -32,6 +32,7 @@
|
|||||||
UsbCommandId_SetLedPwmBrightness = 0x0d,
|
UsbCommandId_SetLedPwmBrightness = 0x0d,
|
||||||
UsbCommandId_GetModuleProperty = 0x0e,
|
UsbCommandId_GetModuleProperty = 0x0e,
|
||||||
UsbCommandId_GetSlaveI2cErrors = 0x0f,
|
UsbCommandId_GetSlaveI2cErrors = 0x0f,
|
||||||
|
UsbCommandId_SetI2cBaudRate = 0x10,
|
||||||
} usb_command_id_t;
|
} usb_command_id_t;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|||||||
Reference in New Issue
Block a user