Skip to content

Commit

Permalink
Bug fixes. Thanks to TimoHartong.
Browse files Browse the repository at this point in the history
  • Loading branch information
Memotech-Bill committed Dec 12, 2024
1 parent b67de9f commit e358368
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/memu/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ int i2c_get (struct gio_dev *pdev, int iReg, int iLen, unsigned char *pbData)

msg[0].addr = pdev->iAddr;
msg[0].flags = 0;
msg[0].len = iLen + 1;
msg[0].len = sizeof (bAddr);
msg[0].buf = &bAddr;
msg[1].addr = pdev->iAddr;
msg[1].flags = I2C_M_RD;
Expand Down Expand Up @@ -739,13 +739,13 @@ void gio_put (int nPin, struct gio_pin *ppin, uint32_t iData)
#if HAVE_HW_GPIO
if ( pdev->type == gio_gpio )
{
if ( pdev->iData ) gpio_put (pdev, pdev->iMask, pdev->iData);
if ( pdev->iMask ) gpio_put (pdev, pdev->iMask, pdev->iData);
}
#endif
#if HAVE_HW_MCP23017
if ( pdev->type == gio_xio )
{
if ( ( pdev->fd > 0 ) && ( pdev->iData ) ) xio_put (pdev, pdev->iMask, pdev->iData);
if ( ( pdev->fd > 0 ) && ( pdev->iMask ) ) xio_put (pdev, pdev->iMask, pdev->iData);
}
#endif
pdev = pdev->pnext;
Expand Down

0 comments on commit e358368

Please sign in to comment.