File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -100,5 +100,12 @@ config PCI_EPF_TEST
100100 ---help---
101101 pci epf test driver
102102
103+ config PCI_EPF_TEST_FUNC_COUNT
104+ int "EPC Function Number"
105+ default 1
106+ range 1 8
107+ ---help---
108+ This option set the epc's function number
109+
103110endif # PCI_ENDPOINT
104111
Original file line number Diff line number Diff line change 3838#include <nuttx/pci/pci_ids.h>
3939#include <nuttx/pci/pci.h>
4040#include <nuttx/wqueue.h>
41+ #include <nuttx/nuttx.h>
4142
4243/****************************************************************************
4344 * Pre-processor Definitions
4445 ****************************************************************************/
4546
46- #define PCI_EPF_TEST_FUNCTIONS 2
47-
4847#define PCI_EPF_TEST_IRQ_TYPE_LEGACY 0
4948#define PCI_EPF_TEST_IRQ_TYPE_MSI 1
5049#define PCI_EPF_TEST_IRQ_TYPE_MSIX 2
@@ -716,14 +715,14 @@ int pci_register_epf_test_device(FAR const char *epc_name)
716715 int ret ;
717716 int i ;
718717
719- epf = kmm_zalloc (sizeof (* epf ) * PCI_EPF_TEST_FUNCTIONS );
718+ epf = kmm_zalloc (sizeof (* epf ) * CONFIG_PCI_EPF_TEST_FUNC_COUNT );
720719 if (NULL == epf )
721720 {
722721 pcierr ("create epf error\n" );
723722 return - ENOMEM ;
724723 }
725724
726- for (i = 0 ; i < PCI_EPF_TEST_FUNCTIONS ; i ++ )
725+ for (i = 0 ; i < CONFIG_PCI_EPF_TEST_FUNC_COUNT ; i ++ )
727726 {
728727 epf [i ].name = g_pci_epf_test_name [i ];
729728 epf [i ].epc_name = epc_name ;
You can’t perform that action at this time.
0 commit comments