Section 5 — Programming
5-9
esp_open_system Initialize PCI Communications
Synopsis:
#include “esp6000.h”
int esp_open_system(void)
Arguments:
None
Library Location:
\esp6000.dll
Description:
esp_open_system() initializes the ESP6000 PCI bus communication, but does not
invoke a board hardware reset.
Returns:
ESPOK, ESPERROR
Hint:
Always evaluate returned value from esp_open_system()
Usage Example:
# include <stdio.h>
# include <stdlib.h>
# include “esp6000.h”
void tell_error(int esp_error)
{
char buffer[MAX_ERROR_LEN];
switch (esp_error)
{
case ESP_OK: /* ESP6000 and communications OK */
break;
default:
error_msg(error_code, buffer) ;
fprintf(stderr, “ERROR: %s
(%d).\n”, buffer,
esp_error);
exit(1);
break;
}
}
int
main()
{
int esp_error;
esp_error = esp_open_system();
/* initialize
ESP6000 */
tell_error(esp_error);
/* report errors (if any) */
return (0);
}
See Also:
esp_init_system()
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com