Method: OdroidLCD::HW#initialize

Defined in:
ext/odroid_lcd/odroid_lcd_hw.c

#initializeObject




45
46
47
48
49
50
51
52
53
54
55
56
# File 'ext/odroid_lcd/odroid_lcd_hw.c', line 45

static VALUE odlcd_init(VALUE self) {
  VALUE lcd_handle;

  // Initialize the LCD, raises a RuntimeError if we fail.
  wiringPiSetup();
  lcd_handle = rb_funcall(self, rb_intern("system_init"), 0);

  // We store the wiringPi lcdHandle in an instance variable.
  rb_iv_set(self, "@lcd_handle", lcd_handle);

  return self;
}