threewire.c revision a734c64bff58bda2fa48c2795453e092167b0ff7
/*
* Copyright (C) 2006 Michael Brown <mbrown@fensystems.co.uk>.
*
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <stddef.h>
#include <string.h>
#include <assert.h>
#include <unistd.h>
#include <ipxe/threewire.h>
/** @file
*
* Three-wire serial devices
*
*/
/**
* Read data from three-wire device
*
* @v nvs NVS device
* @v address Address from which to read
* @v data Data buffer
* @v len Length of data buffer
* @ret rc Return status code
*/
int rc;
return rc;
}
return 0;
}
/**
* Write data to three-wire device
*
* @v nvs NVS device
* @v address Address from which to read
* @v data Data buffer
* @v len Length of data buffer
* @ret rc Return status code
*/
int rc;
/* Enable device for writing */
return rc;
}
/* Write data */
return rc;
}
/* Our model of an SPI bus doesn't provide a mechanism for
* "assert CS, wait for MISO to become high, so just wait for
* long enough to ensure that the write has completed.
*/
return 0;
}
/**
* Autodetect device address length
*
* @v device SPI device
* @ret rc Return status code
*/
int rc;
return rc;
}
return 0;
}