62 lines
1.9 KiB
C
62 lines
1.9 KiB
C
|
|
/*
|
||
|
|
* Author: Brendan Le Foll <brendan.le.foll@intel.com>
|
||
|
|
* Copyright (c) 2014 Intel Corporation.
|
||
|
|
*
|
||
|
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||
|
|
* a copy of this software and associated documentation files (the
|
||
|
|
* "Software"), to deal in the Software without restriction, including
|
||
|
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||
|
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||
|
|
* permit persons to whom the Software is furnished to do so, subject to
|
||
|
|
* the following conditions:
|
||
|
|
*
|
||
|
|
* The above copyright notice and this permission notice shall be
|
||
|
|
* included in all copies or substantial portions of the Software.
|
||
|
|
*
|
||
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||
|
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||
|
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||
|
|
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||
|
|
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||
|
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||
|
|
*/
|
||
|
|
|
||
|
|
#include <stdlib.h>
|
||
|
|
#include <string.h>
|
||
|
|
|
||
|
|
#include "common.h"
|
||
|
|
#include "intel_galileo_gen2.h"
|
||
|
|
|
||
|
|
maa_board_t*
|
||
|
|
maa_intel_galileo_gen2()
|
||
|
|
{
|
||
|
|
maa_board_t* b = (maa_board_t*) malloc(sizeof(maa_board_t));
|
||
|
|
if (b == NULL)
|
||
|
|
return NULL;
|
||
|
|
|
||
|
|
b->phy_pin_count = 20;
|
||
|
|
b->gpio_count = 14;
|
||
|
|
b->aio_count = 6;
|
||
|
|
|
||
|
|
b->pins = (maa_pininfo_t*) malloc(sizeof(maa_pininfo_t)*MAA_INTEL_GALILEO_GEN_2_PINCOUNT);
|
||
|
|
|
||
|
|
//BUS DEFINITIONS
|
||
|
|
b->i2c_bus_count = 1;
|
||
|
|
b->def_i2c_bus = 0;
|
||
|
|
b->i2c_bus[0].bus_id = 0;
|
||
|
|
b->i2c_bus[0].sda = 18;
|
||
|
|
b->i2c_bus[0].scl = 19;
|
||
|
|
|
||
|
|
b->spi_bus_count = 1;
|
||
|
|
b->def_spi_bus = 0;
|
||
|
|
b->spi_bus[0].bus_id = 1;
|
||
|
|
b->spi_bus[0].slave_s = 0;
|
||
|
|
b->spi_bus[0].cs = 10;
|
||
|
|
b->spi_bus[0].mosi = 11;
|
||
|
|
b->spi_bus[0].miso = 12;
|
||
|
|
b->spi_bus[0].sclk = 13;
|
||
|
|
|
||
|
|
return b;
|
||
|
|
}
|