fixed EEPROM user-area space checks for FT232R and FT245R chips in ftdi_eeprom_build()
[libftdi] / examples / cmake_example / main.c
CommitLineData
39042f17
MZ
1/* main.c
2
3 Example for ftdi_new()
4
5 This program is distributed under the GPL, version 2
6*/
7
8#include <stdio.h>
9#include <stdlib.h>
10#include <ftdi.h>
11
12int main(void)
13{
14 struct ftdi_context *ftdi;
15 int retval = EXIT_SUCCESS;
16
17 if ((ftdi = ftdi_new()) == 0)
18 {
19 fprintf(stderr, "ftdi_new failed\n");
20 return EXIT_FAILURE;
21 }
22
23 return retval;
24}