node_modules/rpio/src/rpio.cc
/*
 * Initialize the bcm2835 interface and check we have permission to access it.
 */
Initialize the bcm2835 interface and check we have permission to access it.
Initialize the bcm2835 interface and check we have permission to access it .
NAN_METHOD(rpio_init)
{
	ASSERT_ARGC2(IS_U32, IS_U32);
	soctype = FROM_U32(0);
	uint32_t gpiomem = FROM_U32(1);
	switch (soctype) {
	case RPIO_SOC_BCM2835:
		if (!bcm2835_init(gpiomem)) {
			return ThrowError("Could not initialize bcm2835");
		}
		break;
	case RPIO_SOC_SUNXI:
		if (!sunxi_init(gpiomem)) {
			return ThrowError("Could not initialize sunxi");
		}
		break;
	}
}
NAN_METHOD ( rpio_init ) { ASSERT_ARGC2 ( IS_U32 , IS_U32 ) ; soctype = FROM_U32 ( 0 ) ; uint32_t gpiomem = FROM_U32 ( 1 ) ; switch ( soctype ) { case RPIO_SOC_BCM2835 : if ( ! bcm2835_init ( gpiomem ) ) { return ThrowError ( " " ) ; } break ; case RPIO_SOC_SUNXI : if ( ! sunxi_init ( gpiomem ) ) { return ThrowError ( " " ) ; } break ; } }
Initialize the bcm2835 interface and check we have permission to access it.
Initialize the bcm2835 interface and check we have permission to access it .