]> Chaos Git - corbenik/corbenik.git/commitdiff
Replace upstream bdfe with a stripped down fork
authorchaoskagami <chaos.kagami@gmail.com>
Sun, 19 Jun 2016 01:10:07 +0000 (21:10 -0400)
committerchaoskagami <chaos.kagami@gmail.com>
Sun, 19 Jun 2016 01:10:07 +0000 (21:10 -0400)
.gitmodules
host/bdfe
host/stub-i2c-bdfe.patch [deleted file]

index 6d171757198604f9ebe6cd5192a3080a936dcc57..0dd8102830fab36c874277c84726a9e77bd73219 100644 (file)
@@ -1,6 +1,6 @@
-[submodule "host/bdfe"]
-       path = host/bdfe
-       url = https://github.com/achilikin/bdfe
 [submodule "external/tewi-font"]
        path = external/tewi-font
        url = https://github.com/Lucy/tewi-font
+[submodule "host/bdfe"]
+       path = host/bdfe
+       url = https://github.com/chaoskagami/bdfe
index dba10ac9b796bdac744b8ad6acdc299461fc867d..359f34a0012bd58c86a5c171695abf8874a7e7b2 160000 (submodule)
--- a/host/bdfe
+++ b/host/bdfe
@@ -1 +1 @@
-Subproject commit dba10ac9b796bdac744b8ad6acdc299461fc867d
+Subproject commit 359f34a0012bd58c86a5c171695abf8874a7e7b2
diff --git a/host/stub-i2c-bdfe.patch b/host/stub-i2c-bdfe.patch
deleted file mode 100644 (file)
index 38fd683..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-diff -urN bdfe/li2c.c bdfe-stubi2c/li2c.c
---- a/host/bdfe/li2c.c 2016-06-18 23:35:56.639775500 +0000
-+++ b/host/bdfe/li2c.c 2016-06-18 23:35:15.467047200 +0000
-@@ -38,95 +38,34 @@
-       options i2c_bcm2708 baudrate=400000
- */
--#include <stdio.h>
--#include <fcntl.h>
--#include <unistd.h>
--#include <sys/ioctl.h>
--#include <linux/i2c-dev.h>
--
- #include "li2c.h"
--/* by default RPi mode, so bus 1 is valid for RPi and Edison */
--static li2c_mode_t i2c_mode = LI2C_RPI;
--
--/** i2c bus file descriptors */
--static int i2c_bus[LI2C_MAX_BUS];
--
--static int is_valid_bus(uint8_t bus)
--{
--      if (i2c_mode == LI2C_RPI) {
--              if (bus > PI2C_MAX_BUS)
--                      return 0;
--              return 1;
--      }
--      if (i2c_mode == LI2C_EDISON) {
--              if (bus > EDI2C_MAX_BUS)
--                      return 0;
--              return 1;
--      }
--      return 0;
--}
--
- /* select I2C mode - Raspberry or Edison for bus index validation */
- int li2c_init(li2c_mode_t mode)
- {
--      for(int i = 0; i < LI2C_MAX_BUS; i++)
--              i2c_bus[i] = -1;
--      i2c_mode = mode;
-       return 0;
- }
- /** open I2C bus if not opened yet and store file descriptor */
- int li2c_open(uint8_t bus)
- {
--      char bus_name[64];
--
--      if (!is_valid_bus(bus))
--              return -1;
--
--      // already opened?
--      if (i2c_bus[bus] >= 0)
--              return 0;
--
--      // open i2c bus and store file descriptor
--      sprintf(bus_name, "/dev/i2c-%u", bus);
--
--      if ((i2c_bus[bus] = open(bus_name, O_RDWR)) < 0)
--              return -1;
--
-       return 0;
- }
- /** close I2C bus file descriptor */
- int li2c_close(uint8_t bus)
- {
--      if (!is_valid_bus(bus))
--              return -1;
--
--      if (i2c_bus[bus] >= 0)
--              close(i2c_bus[bus]);
--      i2c_bus[bus] = -1;
--
-       return 0;
- }
- /** select I2C device for li2c_write() calls */
- int li2c_select(uint8_t bus, uint8_t slave)
- {
--      if (!is_valid_bus(bus) || (i2c_bus[bus] < 0))
--              return -1;
--
--      return ioctl(i2c_bus[bus], I2C_SLAVE, slave);
-+      return 0;
- }
- /** write to I2C device selected by li2c_select() */
- int li2c_write(uint8_t bus, const uint8_t *data, uint32_t len)
- {
--      if (!is_valid_bus(bus) || (i2c_bus[bus] < 0))
--              return -1;
--
--      if (write(i2c_bus[bus], data, len) != (ssize_t)len)
--              return -1;
--
-       return 0;
- }