advance_func->i2c_init_pre = &mraa_raspberry_pi_i2c_init_pre;
advance_func->gpio_mmap_setup = &mraa_raspberry_pi_mmap_setup;
- strncpy(b->pins[0].name, "INVALID", 8);
+ strncpy(b->pins[0].name, "INVALID", MRAA_PIN_NAME_SIZE);
b->pins[0].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
- strncpy(b->pins[1].name, "3V3", 8);
+ strncpy(b->pins[1].name, "3V3", MRAA_PIN_NAME_SIZE);
b->pins[1].capabilites = (mraa_pincapabilities_t){ 1, 0, 0, 0, 0, 0, 0, 0 };
- strncpy(b->pins[2].name, "5V", 8);
+ strncpy(b->pins[2].name, "5V", MRAA_PIN_NAME_SIZE);
b->pins[2].capabilites = (mraa_pincapabilities_t){ 1, 0, 0, 0, 0, 0, 0, 0 };
- strncpy(b->pins[3].name, "SDA0", 8);
+ strncpy(b->pins[3].name, "SDA0", MRAA_PIN_NAME_SIZE);
b->pins[3].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 1, 0, 0 };
b->pins[3].gpio.pinmap = 2;
b->pins[3].gpio.mux_total = 0;
b->pins[3].i2c.pinmap = 0;
b->pins[3].i2c.mux_total = 0;
- strncpy(b->pins[4].name, "5V", 8);
+ strncpy(b->pins[4].name, "5V", MRAA_PIN_NAME_SIZE);
b->pins[4].capabilites = (mraa_pincapabilities_t){ 1, 0, 0, 0, 0, 0, 0, 0 };
- strncpy(b->pins[5].name, "SCL0", 8);
+ strncpy(b->pins[5].name, "SCL0", MRAA_PIN_NAME_SIZE);
b->pins[5].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 1, 0, 0 };
b->pins[5].gpio.pinmap = 3;
b->pins[5].gpio.mux_total = 0;
b->pins[5].i2c.pinmap = 0;
b->pins[5].i2c.mux_total = 0;
- strncpy(b->pins[6].name, "GND", 8);
+ strncpy(b->pins[6].name, "GND", MRAA_PIN_NAME_SIZE);
b->pins[6].capabilites = (mraa_pincapabilities_t){ 1, 0, 0, 0, 0, 0, 0, 0 };
- strncpy(b->pins[7].name, "GPIO4", 8);
+ strncpy(b->pins[7].name, "GPIO4", MRAA_PIN_NAME_SIZE);
b->pins[7].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
b->pins[7].gpio.pinmap = 4;
b->pins[7].gpio.mux_total = 0;
- strncpy(b->pins[8].name, "UART_TX", 8);
+ strncpy(b->pins[8].name, "UART_TX", MRAA_PIN_NAME_SIZE);
b->pins[8].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
b->pins[8].gpio.pinmap = 14;
b->pins[8].gpio.mux_total = 0;
b->pins[8].uart.parent_id = 0;
b->pins[8].uart.mux_total = 0;
- strncpy(b->pins[9].name, "GND", 8);
+ strncpy(b->pins[9].name, "GND", MRAA_PIN_NAME_SIZE);
b->pins[9].capabilites = (mraa_pincapabilities_t){ 1, 0, 0, 0, 0, 0, 0, 0 };
- strncpy(b->pins[10].name, "UART_RX", 8);
+ strncpy(b->pins[10].name, "UART_RX", MRAA_PIN_NAME_SIZE);
b->pins[10].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
b->pins[10].gpio.pinmap = 15;
b->pins[10].gpio.mux_total = 0;
b->pins[10].uart.parent_id = 0;
b->pins[10].uart.mux_total = 0;
- strncpy(b->pins[11].name, "GPIO17", 8);
+ strncpy(b->pins[11].name, "GPIO17", MRAA_PIN_NAME_SIZE);
b->pins[11].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
b->pins[11].gpio.pinmap = 17;
b->pins[11].gpio.mux_total = 0;
- strncpy(b->pins[12].name, "GPIO18", 8);
+ strncpy(b->pins[12].name, "GPIO18", MRAA_PIN_NAME_SIZE);
b->pins[12].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
b->pins[12].gpio.pinmap = 18;
b->pins[12].gpio.mux_total = 0;
if (platform_detected == PLATFORM_RASPBERRY_PI_B_REV_1) {
- strncpy(b->pins[13].name, "GPIO21", 8);
+ strncpy(b->pins[13].name, "GPIO21", MRAA_PIN_NAME_SIZE);
b->pins[13].gpio.pinmap = 21;
} else {
- strncpy(b->pins[13].name, "GPIO27", 8);
+ strncpy(b->pins[13].name, "GPIO27", MRAA_PIN_NAME_SIZE);
b->pins[13].gpio.pinmap = 27;
}
b->pins[13].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
b->pins[13].gpio.mux_total = 0;
- strncpy(b->pins[14].name, "GND", 8);
+ strncpy(b->pins[14].name, "GND", MRAA_PIN_NAME_SIZE);
b->pins[14].capabilites = (mraa_pincapabilities_t){ 1, 0, 0, 0, 0, 0, 0, 0 };
- strncpy(b->pins[15].name, "GPIO22", 8);
+ strncpy(b->pins[15].name, "GPIO22", MRAA_PIN_NAME_SIZE);
b->pins[15].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
b->pins[15].gpio.pinmap = 22;
b->pins[15].gpio.mux_total = 0;
- strncpy(b->pins[16].name, "GPIO23", 8);
+ strncpy(b->pins[16].name, "GPIO23", MRAA_PIN_NAME_SIZE);
b->pins[16].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
b->pins[16].gpio.pinmap = 23;
b->pins[16].gpio.mux_total = 0;
- strncpy(b->pins[17].name, "3V3", 8);
+ strncpy(b->pins[17].name, "3V3", MRAA_PIN_NAME_SIZE);
b->pins[17].capabilites = (mraa_pincapabilities_t){ 1, 0, 0, 0, 0, 0, 0, 0 };
- strncpy(b->pins[18].name, "GPIO24", 8);
+ strncpy(b->pins[18].name, "GPIO24", MRAA_PIN_NAME_SIZE);
b->pins[18].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
b->pins[18].gpio.pinmap = 24;
b->pins[18].gpio.mux_total = 0;
- strncpy(b->pins[19].name, "SPI_MOSI", 8);
+ strncpy(b->pins[19].name, "SPI_MOSI", MRAA_PIN_NAME_SIZE);
b->pins[19].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 };
b->pins[19].gpio.pinmap = 10;
b->pins[19].gpio.mux_total = 0;
b->pins[19].spi.pinmap = 0;
b->pins[19].spi.mux_total = 0;
- strncpy(b->pins[20].name, "GND", 8);
+ strncpy(b->pins[20].name, "GND", MRAA_PIN_NAME_SIZE);
b->pins[20].capabilites = (mraa_pincapabilities_t){ 1, 0, 0, 0, 0, 0, 0, 0 };
- strncpy(b->pins[21].name, "SPI_MISO", 8);
+ strncpy(b->pins[21].name, "SPI_MISO", MRAA_PIN_NAME_SIZE);
b->pins[21].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 };
b->pins[21].gpio.pinmap = 9;
b->pins[21].gpio.mux_total = 0;
b->pins[21].spi.pinmap = 0;
b->pins[21].spi.mux_total = 0;
- strncpy(b->pins[22].name, "GPIO25", 8);
+ strncpy(b->pins[22].name, "GPIO25", MRAA_PIN_NAME_SIZE);
b->pins[22].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
b->pins[22].gpio.pinmap = 25;
b->pins[22].gpio.mux_total = 0;
- strncpy(b->pins[23].name, "SPI_CLK", 8);
+ strncpy(b->pins[23].name, "SPI_CLK", MRAA_PIN_NAME_SIZE);
b->pins[23].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 };
b->pins[23].gpio.pinmap = 11;
b->pins[23].gpio.mux_total = 0;
b->pins[23].spi.pinmap = 0;
b->pins[23].spi.mux_total = 0;
- strncpy(b->pins[24].name, "SPI_CS0", 8);
+ strncpy(b->pins[24].name, "SPI_CS0", MRAA_PIN_NAME_SIZE);
b->pins[24].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 };
b->pins[24].gpio.pinmap = 8;
b->pins[24].gpio.mux_total = 0;
b->pins[24].spi.pinmap = 0;
b->pins[24].spi.mux_total = 0;
- strncpy(b->pins[25].name, "GND", 8);
+ strncpy(b->pins[25].name, "GND", MRAA_PIN_NAME_SIZE);
b->pins[25].capabilites = (mraa_pincapabilities_t){ 1, 0, 0, 0, 0, 0, 0, 0 };
- strncpy(b->pins[26].name, "SPI_CS1", 8);
+ strncpy(b->pins[26].name, "SPI_CS1", MRAA_PIN_NAME_SIZE);
b->pins[26].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 };
b->pins[26].gpio.pinmap = 7;
b->pins[26].gpio.mux_total = 0;
if ((platform_detected == PLATFORM_RASPBERRY_PI_A_REV_2) ||
(platform_detected == PLATFORM_RASPBERRY_PI_B_REV_2)) {
- strncpy(b->pins[27].name, "5V", 8);
+ strncpy(b->pins[27].name, "5V", MRAA_PIN_NAME_SIZE);
b->pins[27].capabilites = (mraa_pincapabilities_t){ 1, 0, 0, 0, 0, 0, 0, 0 };
- strncpy(b->pins[28].name, "3V3", 8);
+ strncpy(b->pins[28].name, "3V3", MRAA_PIN_NAME_SIZE);
b->pins[28].capabilites = (mraa_pincapabilities_t){ 1, 0, 0, 0, 0, 0, 0, 0 };
- strncpy(b->pins[29].name, "GPIO8", 8);
+ strncpy(b->pins[29].name, "GPIO8", MRAA_PIN_NAME_SIZE);
b->pins[29].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
b->pins[29].gpio.pinmap = 8;
b->pins[29].gpio.mux_total = 0;
- strncpy(b->pins[30].name, "GPIO9", 8);
+ strncpy(b->pins[30].name, "GPIO9", MRAA_PIN_NAME_SIZE);
b->pins[30].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
b->pins[30].gpio.pinmap = 9;
b->pins[30].gpio.mux_total = 0;
- strncpy(b->pins[31].name, "GPIO10", 8);
+ strncpy(b->pins[31].name, "GPIO10", MRAA_PIN_NAME_SIZE);
b->pins[31].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
b->pins[31].gpio.pinmap = 10;
b->pins[31].gpio.mux_total = 0;
- strncpy(b->pins[32].name, "GPIO11", 8);
+ strncpy(b->pins[32].name, "GPIO11", MRAA_PIN_NAME_SIZE);
b->pins[32].gpio.pinmap = 11;
b->pins[32].gpio.mux_total = 0;
b->pins[32].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
- strncpy(b->pins[33].name, "GND", 8);
+ strncpy(b->pins[33].name, "GND", MRAA_PIN_NAME_SIZE);
b->pins[33].capabilites = (mraa_pincapabilities_t){ 1, 0, 0, 0, 0, 0, 0, 0 };
- strncpy(b->pins[34].name, "GND", 8);
+ strncpy(b->pins[34].name, "GND", MRAA_PIN_NAME_SIZE);
b->pins[34].capabilites = (mraa_pincapabilities_t){ 1, 0, 0, 0, 0, 0, 0, 0 };
}
(platform_detected == PLATFORM_RASPBERRY_PI_B_PLUS_REV_1) ||
(platform_detected == PLATFORM_RASPBERRY_PI2_B_REV_1)) {
- strncpy(b->pins[27].name, "ID_SD", 8);
+ strncpy(b->pins[27].name, "ID_SD", MRAA_PIN_NAME_SIZE);
b->pins[27].capabilites = (mraa_pincapabilities_t){ 1, 0, 0, 0, 0, 0, 0, 0 };
- strncpy(b->pins[28].name, "ID_SC", 8);
+ strncpy(b->pins[28].name, "ID_SC", MRAA_PIN_NAME_SIZE);
b->pins[28].capabilites = (mraa_pincapabilities_t){ 1, 0, 0, 0, 0, 0, 0, 0 };
- strncpy(b->pins[29].name, "GPIO05", 8);
+ strncpy(b->pins[29].name, "GPIO05", MRAA_PIN_NAME_SIZE);
b->pins[29].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
b->pins[29].gpio.pinmap = 5;
b->pins[29].gpio.mux_total = 0;
- strncpy(b->pins[30].name, "GND", 8);
+ strncpy(b->pins[30].name, "GND", MRAA_PIN_NAME_SIZE);
b->pins[30].capabilites = (mraa_pincapabilities_t){ 1, 0, 0, 0, 0, 0, 0, 0 };
- strncpy(b->pins[31].name, "GPIO06", 8);
+ strncpy(b->pins[31].name, "GPIO06", MRAA_PIN_NAME_SIZE);
b->pins[31].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
b->pins[31].gpio.pinmap = 6;
b->pins[31].gpio.mux_total = 0;
- strncpy(b->pins[32].name, "GPIO12", 8);
+ strncpy(b->pins[32].name, "GPIO12", MRAA_PIN_NAME_SIZE);
b->pins[32].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
b->pins[32].gpio.pinmap = 12;
b->pins[32].gpio.mux_total = 0;
- strncpy(b->pins[33].name, "GPIO13", 8);
+ strncpy(b->pins[33].name, "GPIO13", MRAA_PIN_NAME_SIZE);
b->pins[33].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
b->pins[33].gpio.pinmap = 13;
b->pins[33].gpio.mux_total = 0;
- strncpy(b->pins[34].name, "GND", 8);
+ strncpy(b->pins[34].name, "GND", MRAA_PIN_NAME_SIZE);
b->pins[34].capabilites = (mraa_pincapabilities_t){ 1, 0, 0, 0, 0, 0, 0, 0 };
- strncpy(b->pins[35].name, "GPIO19", 8);
+ strncpy(b->pins[35].name, "GPIO19", MRAA_PIN_NAME_SIZE);
b->pins[35].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
b->pins[35].gpio.pinmap = 19;
b->pins[35].gpio.mux_total = 0;
- strncpy(b->pins[36].name, "GPIO16", 8);
+ strncpy(b->pins[36].name, "GPIO16", MRAA_PIN_NAME_SIZE);
b->pins[36].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
b->pins[36].gpio.pinmap = 16;
b->pins[36].gpio.mux_total = 0;
- strncpy(b->pins[37].name, "GPIO26", 8);
+ strncpy(b->pins[37].name, "GPIO26", MRAA_PIN_NAME_SIZE);
b->pins[37].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
b->pins[37].gpio.pinmap = 26;
b->pins[37].gpio.mux_total = 0;
- strncpy(b->pins[38].name, "GPIO20", 8);
+ strncpy(b->pins[38].name, "GPIO20", MRAA_PIN_NAME_SIZE);
b->pins[38].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
b->pins[38].gpio.pinmap = 20;
b->pins[38].gpio.mux_total = 0;
- strncpy(b->pins[39].name, "GND", 8);
+ strncpy(b->pins[39].name, "GND", MRAA_PIN_NAME_SIZE);
b->pins[39].capabilites = (mraa_pincapabilities_t){ 1, 0, 0, 0, 0, 0, 0, 0 };
- strncpy(b->pins[40].name, "GPIO21", 8);
+ strncpy(b->pins[40].name, "GPIO21", MRAA_PIN_NAME_SIZE);
b->pins[40].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
b->pins[40].gpio.pinmap = 21;
b->pins[40].gpio.mux_total = 0;