From df4e6ced4e1f46eaaa79359e71860f99f30e08cb Mon Sep 17 00:00:00 2001 From: aleph Date: Fri, 6 May 2011 17:13:30 +0000 Subject: [PATCH] mt29f driver: initialize correctly kblock virtual table when unbuffered. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4880 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cpu/cortex-m3/drv/mt29f_sam3.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bertos/cpu/cortex-m3/drv/mt29f_sam3.c b/bertos/cpu/cortex-m3/drv/mt29f_sam3.c index 73faca1d..30afed07 100644 --- a/bertos/cpu/cortex-m3/drv/mt29f_sam3.c +++ b/bertos/cpu/cortex-m3/drv/mt29f_sam3.c @@ -877,8 +877,11 @@ bool mt29f_init(Mt29f *chip, struct Heap *heap, unsigned chip_select) bool mt29f_initUnbuffered(Mt29f *chip, struct Heap *heap, unsigned chip_select) { + if (!commonInit(chip, heap, chip_select)) + return false; + chip->fd.priv.vt = &mt29f_unbuffered_vt; - return commonInit(chip, heap, chip_select); + return true; } -- 2.25.1