Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

modified: bcm_host.lua

	modified:   gpio.lua
	modified:   interface/vcos/vcos.lua
	modified:   interface/vmcs_host/vc_dispmanx.lua
	modified:   interface/vmcs_host/vc_dispmanx_types.lua
	new file:   tests/test_bcm_host.lua
  • Loading branch information...
commit bc995f5b61bd61baa022ad4889e258b7d3605539 1 parent d2f19f6
William Adams authored
8 bcm_host.lua
View
@@ -1,3 +1,5 @@
+package.path = package.path..";interface/vctypes/?.lua;interface/vchi/?.lua;interface/vcos/?.lua;interface/vcos/pthreads/?.lua;interface/vmcs_host/?.lua"
+
local ffi = require "ffi"
ffi.cdef [[
@@ -34,8 +36,11 @@ local GetDisplaySize = function(display_number)
return pWidth[0], pHeight[0];
end
+
+require "vc_dispmanx"
+
--[[
-require "interface/vmcs_host/vc_dispmanx"
+
require "interface/vmcs_host/vc_tvservice"
require "interface/vmcs_host/vc_cec"
require "interface/vmcs_host/vc_cecservice"
@@ -47,3 +52,4 @@ return {
GetDisplaySize = GetDisplaySize,
}
+
2  gpio.lua
View
@@ -5,8 +5,10 @@
local error, tostring, setmt = error, tostring, setmetatable
local bit = require("bit")
local band, bor, shl, shr = bit.band, bit.bor, bit.lshift, bit.rshift
+
local ffi = require("ffi")
local C = ffi.C
+
require "syscall"
2  interface/vcos/vcos.lua
View
@@ -1,5 +1,5 @@
-package.path = package.path..";pthreads/?.lua;"
+package.path = package.path..";./pthreads/?.lua;"
--[[
=============================================================================
VideoCore OS Abstraction Layer - public header file
2  interface/vmcs_host/vc_dispmanx.lua
View
@@ -12,7 +12,7 @@ require "vcos"
require "vc_image_types"
require "vc_dispservice_x_defs"
require "vc_dispmanx_types"
-require "vchi"
+--require "vchi"
ffi.cdef[[
// Same function as above, to aid migration of code.
1  interface/vmcs_host/vc_dispmanx_types.lua
View
@@ -1,3 +1,4 @@
+package.path = package.path..";../vctypes/?.lua"
local ffi = require "ffi"
12 tests/test_bcm_host.lua
View
@@ -0,0 +1,12 @@
+package.path = package.path..";../?.lua"
+
+local ffi = require "ffi"
+local bit = require "bit"
+
+local bcm = require "bcm_host"
+
+
+print(bcm.GetDisplaySize());
+
+
+
Please sign in to comment.
Something went wrong with that request. Please try again.