mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-30 15:52:12 +01:00
ET OSD: Adapt to new I2C API
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1316 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
4cba4929c2
commit
be2f5bbf70
@ -38,11 +38,11 @@
|
||||
//
|
||||
// Configuration
|
||||
//
|
||||
#define DEBUG_PORT PIOS_COM_TELEM_RF
|
||||
#define DEBUG_PORT PIOS_COM_GPS
|
||||
#define STACK_SIZE 1024
|
||||
#define TASK_PRIORITY (tskIDLE_PRIORITY + 3)
|
||||
#define ENABLE_DEBUG_MSG
|
||||
#define DUMP_CONFIG // Enable this do read and dump the OSD config
|
||||
//#define DUMP_CONFIG // Enable this do read and dump the OSD config
|
||||
//#define WRITE_CONFIG // Enable this do write and verify the OSD config
|
||||
//#define DO_PAR_SEEK // Enable this to start a tool to find where parameters are encoded
|
||||
|
||||
@ -959,13 +959,19 @@ static void Task(void* parameters)
|
||||
#endif
|
||||
|
||||
DEBUG_MSG("SendMsg .");
|
||||
if (PIOS_I2C_LockDevice(5000 / portTICK_RATE_MS))
|
||||
{
|
||||
DEBUG_MSG(".");
|
||||
PIOS_I2C_Transfer(I2C_Write, 0x30<<1, msg, sizeof(msg));
|
||||
DEBUG_MSG(".");
|
||||
PIOS_I2C_UnlockDevice();
|
||||
const struct pios_i2c_txn txn_list[] = {
|
||||
{
|
||||
.addr = 0x30<<1,
|
||||
.rw = PIOS_I2C_TXN_WRITE,
|
||||
.len = sizeof(msg),
|
||||
.buf = msg,
|
||||
},
|
||||
};
|
||||
|
||||
PIOS_I2C_Transfer(PIOS_I2C_MAIN_ADAPTER, txn_list, NELEMENTS(txn_list));
|
||||
}
|
||||
|
||||
DEBUG_MSG("\n\r");
|
||||
|
||||
cnt++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user