diff options
author | Kevin Brace <kevinbrace@gmx.com> | 2019-07-17 19:54:09 -0700 |
---|---|---|
committer | Kevin Brace <kevinbrace@gmx.com> | 2019-07-20 17:22:01 -0700 |
commit | d5f71611d9a5375d63a8f027b52335d3de8b6e89 (patch) | |
tree | 6290f2902b03946ebd2aff3abbc49d3077f7b2a2 | |
parent | ad8486b4e9e0dc64171d515a2c096c0f4b545dd9 (diff) |
Declare an I2C bus name string as a static type for lg_i2c.c
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
-rw-r--r-- | src/lg_i2c.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lg_i2c.c b/src/lg_i2c.c index f4894bd..44387ff 100644 --- a/src/lg_i2c.c +++ b/src/lg_i2c.c @@ -16,6 +16,11 @@ #define _LG_PRIVATE_ #include "lg.h" + +static char strI2CBus1[] = "I2C bus 1"; +static char strI2CBus2[] = "I2C bus 2"; + + static void LgI2CPutBits(I2CBusPtr b, int clock, int data) { @@ -75,7 +80,7 @@ LgI2CInit(ScrnInfoPtr pScrn) pCir->I2CPtr1 = I2CPtr; - I2CPtr->BusName = "I2C bus 1"; + I2CPtr->BusName = strI2CBus1; I2CPtr->scrnIndex = pScrn->scrnIndex; I2CPtr->I2CPutBits = LgI2CPutBits; I2CPtr->I2CGetBits = LgI2CGetBits; @@ -90,7 +95,7 @@ LgI2CInit(ScrnInfoPtr pScrn) pCir->I2CPtr2 = I2CPtr; - I2CPtr->BusName = "I2C bus 2"; + I2CPtr->BusName = strI2CBus2; I2CPtr->scrnIndex = pScrn->scrnIndex; I2CPtr->I2CPutBits = LgI2CPutBits; I2CPtr->I2CGetBits = LgI2CGetBits; |